login
A030471
Primes which are concatenations of four consecutive numbers.
6
4567, 14151617, 20212223, 34353637, 58596061, 64656667, 118119120121, 140141142143, 148149150151, 176177178179, 196197198199, 218219220221, 220221222223, 236237238239, 238239240241, 268269270271, 278279280281
OFFSET
1,1
COMMENTS
There are no primes which are concatenations of three consecutive numbers (A001703), in fact all such concatenations are divisible by 3. - Zak Seidov, Oct 25 2014
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Zak Seidov)
MATHEMATICA
A279204[n_] := FromDigits[Flatten[IntegerDigits[Range[n, n + 3]]]];
Select[Array[A279204, 500], PrimeQ] (* Paolo Xausa, Aug 26 2024 *)
PROG
(PARI) lista(nn) = for(n=1, nn, if (isprime(q=eval(concat(concat(concat(Str(n), Str(n+1)), Str(n+2)), Str(n+3)))), print1(q, ", "))); \\ Michel Marcus, Oct 26 2014
(Python)
from sympy import isprime
from itertools import count, islice
def agen(): # generator of terms
strs = ["1", "2", "3", "4"]
for k in count(1):
if isprime(t:=int("".join(strs))): yield t
strs = strs[1:] + [str(k+4)]
print(list(islice(agen(), 20))) # Michael S. Branicky, Aug 26 2024
CROSSREFS
KEYWORD
nonn,base
EXTENSIONS
Edited by Charles R Greathouse IV, Apr 23 2010
STATUS
approved