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.

A006055 Primes with consecutive (ascending) digits.

This page as a plain text file.
%I A006055 M0679 #55 Feb 16 2025 08:32:29
%S A006055 2,3,5,7,23,67,89,4567,78901,678901,23456789,45678901,9012345678901,
%T A006055 789012345678901,56789012345678901234567890123,
%U A006055 90123456789012345678901234567,678901234567890123456789012345678901
%N A006055 Primes with consecutive (ascending) digits.
%D A006055 J. S. Madachy, Consecutive-digit primes - again, J. Rec. Math., 5 (No. 4, 1972), 253-254.
%D A006055 Thomas E. Moore, A Note on the Distribution of Primes in Arithmetic Progressions, J. Rec. Math., 5 (1972), 253-254.
%D A006055 R. C. Schroeppel, personal communication, 1991.
%D A006055 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A006055 D. Zwillinger, Consecutive-Digit Primes - In Different Bases, J. Rec. Math., 10 (1972), 32-33.
%H A006055 Paul Tek, <a href="/A006055/b006055.txt">Table of n, a(n) for n = 1..36</a>
%H A006055 J. S. Madachy, <a href="/A006055/a006055_2.pdf">Consecutive-digit primes - again</a>, J. Rec. Math., 5 (No. 4, 1972), 253-254. (Annotated scanned copy with letter to N. J. A. Sloane)
%H A006055 R. Schroeppel, <a href="/A006055/a006055.pdf">Email to N. J. A. Sloane, Jun 1991</a>
%H A006055 R. Schroeppel, <a href="/A006055/a006055_1.pdf">Email to N. J. A. Sloane, Jun. 1991</a>
%H A006055 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeNumber.html">Prime Number.</a>
%t A006055 f[n_] := Block[{u = Range@n, t = Table[1, {n}]}, Select[ Drop[ Union@ Flatten@ Table[ FromDigits[ Mod[u + i*t, 10]], {i, 10}], 2], PrimeQ@# &]]; Array[f, 35] // Flatten (* _Robert G. Wilson v_, Jul 05 2006 *)
%o A006055 (Python)
%o A006055 from sympy import isprime
%o A006055 from itertools import count, islice
%o A006055 def bgen(): yield from (int("".join(str((s0+i)%10) for i in range(d))) for d in count(1) for s0 in range(1, 10))
%o A006055 def agen(): yield from filter(isprime, bgen())
%o A006055 print(list(islice(agen(), 18))) # _Michael S. Branicky_, May 26 2022
%Y A006055 Cf. A052016, A052017, A048398, A120804, A120805.
%K A006055 nonn,base
%O A006055 1,1
%A A006055 _N. J. A. Sloane_, Richard C. Schroeppel
%E A006055 a(17) from _Robert G. Wilson v_, Jul 05 2006
%E A006055 Entry revised by _N. J. A. Sloane_, Feb 07 2007