OFFSET
1,1
COMMENTS
These are the positions of 2 in A378369 (difference between n and the next nonsquarefree number).
The asymptotic density of this sequence is Product_{p prime} (1 - 2/p^2) - Product_{p prime} (1 - 3/p^2) = A065474 - A206256 = 0.19714711803343537224... . - Amiram Eldar, Dec 03 2024
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MATHEMATICA
Select[Range[100], NestWhile[#+1&, #, SquareFreeQ[#]&]==#+2&]
PROG
(PARI) list(lim) = my(q1 = 1, q2 = 1, q3); for(k = 3, lim, q3 = issquarefree(k); if(q1 && q2 &&!q3, print1(k-2, ", ")); q1 = q2; q2 = q3); \\ Amiram Eldar, Dec 03 2024
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Gus Wiseman, Dec 02 2024
STATUS
approved