login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A020458 Primes that contain digits 2 and 3 only. 52
2, 3, 23, 223, 233, 2333, 3323, 23333, 32233, 32323, 33223, 222323, 232333, 233323, 323233, 323333, 333233, 333323, 2222333, 2223233, 2232323, 2233223, 2332333, 2333323, 3222223, 3223223, 3223333, 3233323, 3233333, 3332233, 3333233, 22222223, 22223323, 22232233 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
James Maynard and Brady Haran, Primes without a 7, Numberphile video (2019)
MATHEMATICA
Flatten[Table[Select[FromDigits/@Tuples[{2, 3}, n], PrimeQ], {n, 7}]] (* Harvey P. Dale, Jul 13 2012 *)
PROG
(PARI) go(n)=my(v=List([2]), x, t); for(d=1, n, x=10^d\9*2; forstep(i=1, 2^d-1, 2, if(ispseudoprime(t=x+fromdigits(binary(i))), listput(v, t)))); Vec(v) \\ Charles R Greathouse IV, Sep 14 2015
(Python)
from sympy import isprime
from itertools import count, islice, product
def agen(): # generator of terms
yield from [2, 3]
for d in count(2):
for first in product("23", repeat=d-1):
t = int("".join(first) + "3")
if isprime(t): yield t
print(list(islice(agen(), 34))) # Michael S. Branicky, Jun 08 2022
CROSSREFS
Sequence in context: A126702 A260126 A260125 * A139067 A099656 A157733
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Jul 27 2008 at the suggestion of Dmitry Kamenetsky.
Edited by Charles R Greathouse IV, Mar 17 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)