login
A383543
a(n) is the largest number k such that i*n + 1 is squarefree for all 0 <= i <= k.
5
2, 3, 0, 1, 2, 3, 0, 0, 2, 7, 0, 1, 1, 6, 0, 2, 0, 15, 0, 3, 2, 1, 0, 0, 2, 0, 0, 5, 2, 3, 0, 6, 2, 4, 0, 7, 1, 3, 0, 1, 2, 3, 0, 0, 2, 7, 0, 0, 0, 6, 0, 4, 0, 5, 0, 2, 2, 1, 0, 1, 2, 0, 0, 7, 2, 7, 0, 6, 2, 4, 0, 3, 1, 0, 0, 1, 2, 7, 0, 0, 2, 6, 0, 1, 1, 6, 0
OFFSET
1,1
COMMENTS
The sums of the first 10^k terms, for k = 1, 2, ..., are 20, 204, 2534, 27314, 282074, 2835574, 28408796, 284149401, 2841591067, 28416151694, ... . Apparently, the asymptotic mean of this sequence is 2.8416..., which seems to be also the asymptotic mean of A383546.
LINKS
FORMULA
a(n) = 0 if and only if n+1 is nonsquarefree (A013929).
MATHEMATICA
a[n_] := Module[{k = 0, s = 1}, While[SquareFreeQ[s], s += n; k++]; k-1]; Array[a, 100]
PROG
(PARI) a(n) = {my(k = 0, s = 1); while(issquarefree(s), s += n; k++); k-1; }
CROSSREFS
Cf. A005117, A013929, A071808, A383544 (indices of records), A383545 (record values), A383546.
Sequence in context: A292603 A308880 A319047 * A276335 A189480 A010873
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Apr 30 2025
STATUS
approved