A089987 Primes in the concatenation of consecutive numbers beginning with 2.
2, 23, 23456789, 23456789101112131415161718192021222324252627
Offset: 1
Crossrefs
Programs
-
Mathematica
Select[Table[FromDigits[Flatten[IntegerDigits[Range[2, n]]]], {n, 2, 30}], PrimeQ[#] & ] (* Robert Price, Nov 05 2018 *)
-
PARI
concatprime(n,p) = { sr=0; y=""; for(x=p,n, y=concat(Str(y),Str(x)); z=eval(y); if(ispseudoprime(z),print1(z","); sr+=1./z; ); ); print(); print(sr) }
Extensions
Offset corrected by Michel Marcus, Apr 21 2017
Comments