OFFSET
1,1
COMMENTS
Nonsquarefree numbers k such that if p < q are the two greatest primes < k, there is at least one nonsquarefree number between p and q but all numbers between q and k are squarefree. - Robert Israel, Nov 20 2024
EXAMPLE
The terms together with their prime indices begin:
12: {1,1,2}
16: {1,1,1,1}
18: {1,2,2}
20: {1,1,3}
24: {1,1,1,2}
40: {1,1,1,3}
48: {1,1,1,1,2}
54: {1,2,2,2}
60: {1,1,2,3}
63: {2,2,4}
68: {1,1,7}
72: {1,1,1,2,2}
75: {2,3,3}
80: {1,1,1,1,3}
84: {1,1,2,4}
90: {1,2,2,3}
98: {1,4,4}
108: {1,1,2,2,2}
112: {1,1,1,1,4}
116: {1,1,10}
128: {1,1,1,1,1,1,1}
132: {1,1,2,5}
MAPLE
q:= 3: R:= NULL: flag:= false: count:= 0:
while count < 100 do
p:= q; q:= nextprime(q);
for k from p+1 to q-1 do
found:= false;
if not numtheory:-issqrfree(k) then
if flag then
count:= count+1; R:= R, k
fi;
found:= true; break
fi;
od;
flag:= found;
od:
R; # Robert Israel, Nov 20 2024
MATHEMATICA
y=Table[NestWhile[#+1&, Prime[n], SquareFreeQ], {n, 100}];
Select[Most[Union[y]], Count[y, #]==1&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 20 2024
STATUS
approved