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.

A036953 Primes having only {0, 1, 2} as digits.

Original entry on oeis.org

2, 11, 101, 211, 1021, 1201, 2011, 2111, 2221, 10111, 10211, 12011, 12101, 12211, 20011, 20021, 20101, 20201, 21001, 21011, 21101, 21121, 21211, 21221, 22111, 101021, 101111, 101221, 102001, 102101, 102121, 110221, 111121, 111211, 112111
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

Number of n-digit terms d(n) = (1, 1, 2, 5, 16, 34, 76, 194, 543, 1469, 4094, 11017, ...); e.g., there are five 4-digit terms: 1021, 1201, 2011, 2111, 2221, hence d(4) = 5. - Zak Seidov, Jun 30 2013
Also, primes in A007089. - M. F. Hasler, Jul 25 2015

Crossrefs

Programs

  • Mathematica
    Select[FromDigits/@Tuples[{0,1,2},6],PrimeQ] (* Harvey P. Dale, Jul 11 2017 *)
  • PARI
    lista(n) = {forprime(p=2, n, if (vecmax(digits(p)) <= 2, print1(p, ", ")))} \\ Michel Marcus, Aug 02 2014
    
  • PARI
    A036953={(n,show=0)->for(d=1,1e9,my(u=vector(d,i,10^(d-i))~);forvec(v=vector(d,i,if(i>1,if(iM. F. Hasler, Jul 25 2015
  • Python
    from gmpy2 import digits
    from sympy import isprime
    [int(digits(n,3)) for n in range(1000) if isprime(int(digits(n,3)))] # Chai Wah Wu, Jul 31 2014
    

Extensions

Edited by M. F. Hasler, Jul 25 2015