A283561 Numbers k such that the concatenation of the first k nonsquares gives a prime.
1, 2, 5, 550, 832, 10431
Offset: 1
Links
- Eric Weisstein's World of Mathematics, Consecutive Number Sequences
Programs
-
Mathematica
cns[n_]:=FromDigits[Flatten[IntegerDigits[Table[k+Floor[1/2+Sqrt[k]],{k,1,n}]]]] Select[Table[cns[n],{n,6100}],PrimeQ]
-
PARI
is(n)=my(s=""); for(k=1,n, s=Str(s, (sqrtint(4*k)+1)\2 + k)); ispseudoprime(eval(s)) \\ Charles R Greathouse IV, Mar 10 2017
Extensions
a(6) from Michael S. Branicky, Apr 28 2025
Comments