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.

A020458 Primes that contain digits 2 and 3 only.

This page as a plain text file.
%I A020458 #24 Jun 08 2022 23:17:33
%S A020458 2,3,23,223,233,2333,3323,23333,32233,32323,33223,222323,232333,
%T A020458 233323,323233,323333,333233,333323,2222333,2223233,2232323,2233223,
%U A020458 2332333,2333323,3222223,3223223,3223333,3233323,3233333,3332233,3333233,22222223,22223323,22232233
%N A020458 Primes that contain digits 2 and 3 only.
%H A020458 Charles R Greathouse IV, <a href="/A020458/b020458.txt">Table of n, a(n) for n = 1..10000</a>
%H A020458 James Maynard and Brady Haran, <a href="https://www.youtube.com/watch?v=eeoBCS7IEqs">Primes without a 7</a>, Numberphile video (2019)
%t A020458 Flatten[Table[Select[FromDigits/@Tuples[{2,3},n],PrimeQ],{n,7}]] (* _Harvey P. Dale_, Jul 13 2012 *)
%o A020458 (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
%o A020458 (Python)
%o A020458 from sympy import isprime
%o A020458 from itertools import count, islice, product
%o A020458 def agen(): # generator of terms
%o A020458     yield from [2, 3]
%o A020458     for d in count(2):
%o A020458         for first in product("23", repeat=d-1):
%o A020458             t = int("".join(first) + "3")
%o A020458             if isprime(t): yield t
%o A020458 print(list(islice(agen(), 34))) # _Michael S. Branicky_, Jun 08 2022
%Y A020458 Cf. A139067, A139069, A032810, A020463.
%K A020458 nonn,base
%O A020458 1,1
%A A020458 _David W. Wilson_
%E A020458 Edited by _N. J. A. Sloane_, Jul 27 2008 at the suggestion of Dmitry Kamenetsky.
%E A020458 Edited by _Charles R Greathouse IV_, Mar 17 2010