login
A383546
a(n) is the largest number k such that i*n - 1 is squarefree for all 1 <= i <= k, or 0 if no such number exists.
5
0, 4, 2, 6, 0, 20, 2, 7, 0, 0, 2, 22, 0, 1, 2, 3, 0, 6, 0, 4, 0, 6, 1, 23, 0, 0, 2, 0, 0, 17, 2, 1, 0, 3, 2, 14, 0, 1, 2, 6, 0, 2, 2, 3, 0, 0, 2, 11, 0, 0, 0, 3, 0, 9, 0, 4, 0, 4, 1, 8, 0, 7, 1, 0, 0, 10, 2, 1, 0, 3, 2, 7, 0, 1, 2, 0, 0, 16, 2, 7, 0, 0, 2, 13, 0
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
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
Cf. A005117, A013929, A071809, A383543, A383547 (indices of records), A383548 (record values).
Sequence in context: A178394 A266391 A091664 * A378328 A010317 A358200
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Apr 30 2025
STATUS
approved