OFFSET
1,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
Numbers k < 12 are not in the sequence since 12 is the smallest number in A126706.
13 and 15 are not in the sequence since 14 is squarefree.
17 is not in the sequence since 16 = 2^4.
a(1) = 19 since 19 is the smallest squarefree number such that 18 = 2*3^2 and 20 = 2*5^2 are not prime powers, but are divisible by a prime square.
a(2) = 51 since 50 = 2*5^2 and 52 = 2^2*13.
a(3) = 53 since 54 = 2*3^3.
a(4) = 55 since 56 = 7*2^3.
a(5) = 89 since 88 = 2^3*11 and 90 = 2*3^2*5, etc.
MATHEMATICA
Reap[Do[If[
And[SquareFreeQ[n],
AllTrue[n + {-1, 1}, Nor[SquareFreeQ[#], PrimePowerQ[#]] &]],
Sow[n]], {n, 1000}] ][[-1, 1]]
PROG
(PARI) list(lim)=my(v=List(), l1, l2); forfactored(k=18, lim\1+1, if(!issquarefree(k) && !issquarefree(l2) && issquarefree(l1) && #k[2][, 1]>1 && #l2[2][, 1]>1, listput(v, l1[1])); l2=l1; l1=k); Vec(v) \\ Charles R Greathouse IV, Nov 27 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Nov 24 2024
STATUS
approved