OFFSET
1,2
COMMENTS
The sums of the first 10^k terms, for k = 1, 2, ..., are 41, 313, 2942, 28825, 284800, 2844262, 28423972, 284178338, 2841613719, 28416262298, ... . Apparently, the asymptotic mean of this sequence is 2.8416..., which seems to be also the asymptotic mean of A383543.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 0 if and only if n = 1 or n-1 is nonsquarefree (A013929).
MATHEMATICA
a[n_] := Module[{k = 1, s = n-1}, While[SquareFreeQ[s], s += n; k++]; k-1]; Array[a, 100]
PROG
(PARI) a(n) = {my(k = 1, s = n-1); while(issquarefree(s), s += n; k++); k-1; }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Apr 30 2025
STATUS
approved
