OFFSET
1,2
COMMENTS
For a guide to related sequences, see A204892.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..12004
FORMULA
a(n) = n * A198293(n). - Antti Karttunen, Dec 05 2021
EXAMPLE
The least k such that 9 divides s(k)-s(j) for some k is k=8, for which j=2: s(8)-s(2) = 20-2 = 18, so a(9)=18.
MATHEMATICA
(See the program at A205402.)
s[m_]:=s[m]=Floor[(m+1)^2/2]/2
A205406[n_]:=(k=2; found=False; While[!found, Do[If[Mod[d=s[k]-s[j], n]==0, found=True; Break[]], {j, k-1}]; k++]; d)
nterms=100; Table[A205406[n], {n, nterms}] (* Paolo Xausa, Dec 03 2021 *)
PROG
(PARI)
A002620(n) = ((n^2)>>2);
A002620shiftedleft(n) = A002620(1+n);
A205406(n) = { my(d); for(k=2, oo, for(j=1, k-1, if(!((d=A002620shiftedleft(k)-A002620shiftedleft(j))%n), return(d)))); }; \\ Antti Karttunen, Dec 05 2021
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Clark Kimberling, Jan 27 2012
EXTENSIONS
Definition corrected by Clark Kimberling, Dec 05 2021
STATUS
approved