cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A030471 Primes which are concatenations of four consecutive numbers.

This page as a plain text file.
%I A030471 #35 Aug 26 2024 13:13:21
%S A030471 4567,14151617,20212223,34353637,58596061,64656667,118119120121,
%T A030471 140141142143,148149150151,176177178179,196197198199,218219220221,
%U A030471 220221222223,236237238239,238239240241,268269270271,278279280281
%N A030471 Primes which are concatenations of four consecutive numbers.
%C A030471 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
%H A030471 Michael S. Branicky, <a href="/A030471/b030471.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Zak Seidov)
%t A030471 A279204[n_] := FromDigits[Flatten[IntegerDigits[Range[n, n + 3]]]];
%t A030471 Select[Array[A279204, 500], PrimeQ] (* _Paolo Xausa_, Aug 26 2024 *)
%o A030471 (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
%o A030471 (Python)
%o A030471 from sympy import isprime
%o A030471 from itertools import count, islice
%o A030471 def agen(): # generator of terms
%o A030471     strs = ["1", "2", "3", "4"]
%o A030471     for k in count(1):
%o A030471         if isprime(t:=int("".join(strs))): yield t
%o A030471         strs = strs[1:] + [str(k+4)]
%o A030471 print(list(islice(agen(), 20))) # _Michael S. Branicky_, Aug 26 2024
%Y A030471 Cf. A001703, A030470, A084551.
%K A030471 nonn,base
%O A030471 1,1
%A A030471 _Patrick De Geest_
%E A030471 Edited by _Charles R Greathouse IV_, Apr 23 2010