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-3 of 3 results.

A173580 Primes where each digit is 0, 1, 2, 4, or 8.

Original entry on oeis.org

2, 11, 41, 101, 181, 211, 241, 281, 401, 421, 811, 821, 881, 1021, 1181, 1201, 1481, 1801, 1811, 2011, 2081, 2111, 2141, 2221, 2281, 2411, 2441, 2801, 4001, 4021, 4111, 4201, 4211, 4241, 4421, 4441, 4481, 4801, 8011, 8081, 8101, 8111, 8221, 8821, 10111
Offset: 1

Views

Author

Michel Lagneau, Feb 22 2010

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 2 to 10000 do: l:=evalf(floor(ilog10(n))+1): n0:=n:indic:=0:for m from 1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10): n0:=v : if u=3 or u= 5 or u= 6 or u=7 or u=9 then indic :=1 :else fi :od :if indic = 0 and type(n,prime) = true then print(n):else fi:od:
  • Mathematica
    Join[{2}, Select[Map[FromDigits, Tuples[{0, 1, 2, 4, 8}, 3]]*10 + 1, PrimeQ]] (* Paolo Xausa, Jun 12 2025 *)
  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def agen(): # generator of terms
        yield 2
        yield from (t for digits in count(2) for f in "1248" for mid in product("01248", repeat=digits-2) if isprime(t:=int(f + "".join(mid) + "1")))
    print(list(islice(agen(), 45))) # Michael S. Branicky, Jun 11 2025

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

A066594 Primes which can be expressed as concatenation of powers of 3 and 0's.

Original entry on oeis.org

3, 11, 13, 19, 31, 101, 103, 109, 113, 127, 131, 139, 181, 191, 193, 199, 271, 311, 313, 331, 811, 911, 919, 991, 1009, 1013, 1019, 1031, 1033, 1039, 1091, 1093, 1103, 1109, 1181, 1193, 1279, 1301, 1303, 1319, 1327, 1381, 1399, 1811, 1901, 1913, 1931
Offset: 1

Views

Author

Amarnath Murthy, Dec 21 2001

Keywords

Examples

			271 is a term as it is a concatenation of 27 and 1 which are powers of 3.
		

Crossrefs

Extensions

Corrected and extended by Christopher Lund (clund(AT)san.rr.com), Apr 14 2002
Showing 1-3 of 3 results.