A334213 Numbers m such that m^k + 1 is squarefree for all 0 <= k <= m.
0, 1, 2, 4, 6, 10, 16, 30, 36, 46, 256
Offset: 1
Examples
4^0 + 1 = 2 is squarefree, 4^1 + 1 = 5 is squarefree, 4^2 + 1 = 17 is squarefree, 4^3 + 1 = 5*13 is squarefree and 4^4 + 1 = 257 is squarefree, so 4 is in the sequence.
Programs
-
Mathematica
Do[L=Length[a];a=Select[a=m^Range[0,m-1]+1,SquareFreeQ[#]&];If[L==m-1,Print[m-1]],{m,0,1000}] (* Metin Sariyar, Apr 21 2020 *)
-
PARI
isOK(m) = k=0; until(k>m, if(!issquarefree(m^k+1), return(0)); k++); 1; for(m=0, 99, if(isOK(m), print1(m, ", ")))
Extensions
a(11) from Jinyuan Wang, May 01 2020
Comments