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.

Showing 1-2 of 2 results.

A383371 Primes having only {1, 2, 4, 8} as digits.

Original entry on oeis.org

2, 11, 41, 181, 211, 241, 281, 421, 811, 821, 881, 1181, 1481, 1811, 2111, 2141, 2221, 2281, 2411, 2441, 4111, 4211, 4241, 4421, 4441, 4481, 8111, 8221, 8821, 11411, 11821, 12211, 12241, 12281, 12421, 12821, 12841, 14221, 14281, 14411, 14821, 18121, 18181, 18211
Offset: 1

Views

Author

Jason Bard, Apr 24 2025

Keywords

Examples

			11 is in this sequence because 1 is an integer power of 2.
13 is not in this sequence because 3 is not an integer power of 2.
		

Crossrefs

Subsequence of A173580. Intersection of A028846 and A000040.
Supersequence of A260267, A260270.

Programs

  • Mathematica
    nmax = 8; Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 4, 8}, n], PrimeQ], {n, 1, nmax}]]
  • PARI
    is(n)=isprime(n) && #setminus(Set(digits(n)),[1,2,4,8])==0 \\ Charles R Greathouse IV, Apr 24 2025

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

Original entry on oeis.org

2, 11, 101, 181, 211, 281, 811, 821, 881, 1021, 1181, 1201, 1801, 1811, 2011, 2081, 2111, 2221, 2281, 2801, 8011, 8081, 8101, 8111, 8221, 8821, 10111, 10181, 10211, 11801, 11821, 12011, 12101, 12211, 12281, 12821, 18121, 18181, 18211, 20011, 20021, 20101, 20201
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Subsequence of A173580.
Supersequence of A036953, A061247, A385775.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 1, 2, 8]];
    
  • Mathematica
    Select[FromDigits /@ Tuples[{0, 1, 2, 8}, n], PrimeQ]
  • PARI
    primes_with(, 1, [0, 1, 2, 8]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("0128"), 41))) # uses function/imports in A385776
    
Showing 1-2 of 2 results.