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-10 of 11 results. Next

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

Original entry on oeis.org

11, 41, 181, 811, 881, 1181, 1481, 1811, 4111, 4441, 4481, 8111, 11411, 14411, 18181, 18481, 41141, 41411, 44111, 48481, 81181, 84181, 84481, 84811, 88411, 88811, 118411, 141181, 141481, 141811, 144481, 148411, 181141, 184111, 184181, 184441, 411841, 418181
Offset: 1

Views

Author

Vincenzo Librandi, Jul 23 2015

Keywords

Comments

A020452 and A020456 are subsequences.

Crossrefs

Cf. similar sequences listed in A260266.

Programs

  • Magma
    [p: p in PrimesUpTo(5*10^5) | Set(Intseq(p)) subset [1, 4, 8]];
  • Mathematica
    Select[Prime[Range[4 10^4]], Complement[IntegerDigits[#], {1, 4, 8}]=={} &]
    Table[Select[10#+1&/@(FromDigits/@Tuples[{1,4,8},n]),PrimeQ],{n,5}]// Flatten (* Harvey P. Dale, Jun 08 2019 *)

A260892 Primes having only {1, 7, 8} as digits.

Original entry on oeis.org

7, 11, 17, 71, 181, 787, 811, 877, 881, 887, 1117, 1171, 1181, 1187, 1777, 1787, 1811, 1871, 1877, 7177, 7187, 7717, 7817, 7877, 8111, 8117, 8171, 8887, 11117, 11171, 11177, 11717, 11777, 11887, 17117, 17881, 18181, 18787, 71171, 71711, 71777, 71881, 71887
Offset: 1

Views

Author

Vincenzo Librandi, Aug 07 2015

Keywords

Comments

A020455, A020456 and A020470 are subsequences.

Crossrefs

Cf. similar sequences listed in A260889.

Programs

  • Magma
    [p: p in PrimesUpTo(2*10^5) | Set(Intseq(p)) subset [1, 7, 8]];
  • Mathematica
    Select[Prime[Range[2 10^5]], Complement[IntegerDigits[#], {1, 7, 8}] == {} &]

A385780 Primes having only {1, 5, 8} as digits.

Original entry on oeis.org

5, 11, 151, 181, 811, 881, 1151, 1181, 1511, 1811, 5581, 5851, 5881, 8111, 8581, 11551, 15511, 15551, 15581, 15881, 18181, 51151, 51511, 51551, 51581, 55511, 58111, 58151, 58511, 81181, 81551, 88811, 111581, 115151, 115811, 155581, 155851, 158551, 158581
Offset: 1

Views

Author

Jason Bard, Jul 13 2025

Keywords

Crossrefs

Supersequence of A020453, A020456.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 5, 8]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{1, 5, 8}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [1, 5, 8]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("158"), 41))) # uses function/imports in A385776
    

A385782 Primes having only {1, 6, 8} as digits.

Original entry on oeis.org

11, 61, 181, 661, 811, 881, 1181, 1811, 1861, 6661, 8111, 8161, 8681, 8861, 11161, 11681, 16111, 16661, 16811, 18181, 18661, 61681, 61861, 66161, 68111, 68161, 68611, 68881, 81181, 81611, 86111, 86161, 86861, 88661, 88681, 88811, 88861, 111611, 116681, 116881
Offset: 1

Views

Author

Jason Bard, Jul 13 2025

Keywords

Crossrefs

Subsequence of A030430. Supersequence of A020454, A020456.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 6, 8]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{1, 6, 8}, n], PrimeQ], {n, 7}]]
    Select[10Flatten[Table[FromDigits/@Tuples[{1,6,8},n],{n,5}]]+1,PrimeQ] (* Harvey P. Dale, Aug 27 2025 *)
  • PARI
    primes_with(, 1, [1, 6, 8]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("168"), 41))) # uses function/imports in A385776
    

A385783 Primes having only {1, 8, 9} as digits.

Original entry on oeis.org

11, 19, 89, 181, 191, 199, 811, 881, 911, 919, 991, 1181, 1811, 1889, 1999, 8111, 8191, 8819, 8999, 9181, 9199, 9811, 11119, 11981, 18119, 18181, 18191, 18199, 18899, 18911, 18919, 19181, 19819, 19889, 19891, 19919, 19991, 81119, 81181, 81199, 81899, 81919
Offset: 1

Views

Author

Jason Bard, Jul 13 2025

Keywords

Crossrefs

Supersequence of A020456, A020457, A020472.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 8, 9]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{1, 8, 9}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [1, 8, 9]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("189"), 41))) # uses function/imports in A385776
    

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

Original entry on oeis.org

2, 11, 181, 211, 281, 811, 821, 881, 1181, 1811, 2111, 2221, 2281, 8111, 8221, 8821, 11821, 12211, 12281, 12821, 18121, 18181, 18211, 21121, 21211, 21221, 21821, 21881, 22111, 22811, 28111, 28181, 28211, 81181, 81281, 82811, 88211, 88811, 111121
Offset: 1

Views

Author

Jason Bard, Jul 09 2025

Keywords

Crossrefs

Supersequence of A020450, A020456.

Programs

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

A385778 Primes having only {1, 3, 8} as digits.

Original entry on oeis.org

3, 11, 13, 31, 83, 113, 131, 181, 311, 313, 331, 383, 811, 881, 883, 1181, 1381, 1811, 1831, 3181, 3313, 3331, 3833, 3881, 8111, 8311, 8831, 11113, 11131, 11311, 11383, 11813, 11831, 11833, 13183, 13313, 13331, 13381, 13831, 13883, 18131, 18133, 18181, 18311
Offset: 1

Views

Author

Jason Bard, Jul 13 2025

Keywords

Crossrefs

Supersequence of A020451, A020456, A020464.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 3, 8]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{1, 3, 8}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [1, 3, 8]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("138"), 41))) # uses function/imports in A385776
    

A213084 Numbers consisting of ones and eights.

Original entry on oeis.org

1, 8, 11, 18, 81, 88, 111, 118, 181, 188, 811, 818, 881, 888, 1111, 1118, 1181, 1188, 1811, 1818, 1881, 1888, 8111, 8118, 8181, 8188, 8811, 8818, 8881, 8888, 11111, 11118, 11181, 11188, 11811, 11818, 11881, 11888, 18111, 18118, 18181, 18188, 18811, 18818
Offset: 1

Views

Author

Jens Ahlström, Jun 05 2012

Keywords

Comments

One and eight begin with vowels. The subsequence of primes begins 11, 181, 811, 1181, 1811, 8111. - Jonathan Vos Post, Jun 14 2012

Crossrefs

Cf. A020456 (primes in this sequence).
Cf. numbers consisting of 1s and ks: A007088 (k=0), A007931 (k=2), A032917 (k=3), A032822 (k=4), A276037 (k=5), A284293 (k=6), A276039 (k=7), A284294 (k=9).

Programs

  • Mathematica
    Flatten[Table[FromDigits/@Tuples[{1,8},n],{n,5}]] (* Harvey P. Dale, Aug 27 2014 *)
  • PARI
    is(n) = #setintersect(vecsort(digits(n), , 8), [0, 2, 3, 4, 5, 6, 7, 9])==0 \\ Felix Fröhlich, Sep 09 2019
  • Python
    res = []
    i = 0
    while len (res) < 260:
        for c in str(i):
            if c in '18':
                continue
            else:
                break
        else:
            res.append(i)
        i = i + 1
    print(res)
    
  • Python
    def a(n): return int(bin(n+1)[3:].replace('1', '8').replace('0', '1'))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Jun 26 2025
    

A036308 Composite numbers whose prime factors contain no digits other than 1 and 8.

Original entry on oeis.org

121, 1331, 1991, 8921, 9691, 12991, 14641, 19921, 21901, 32761, 89221, 98131, 106601, 142901, 146791, 159461, 161051, 199991, 213761, 219131, 240911, 327791, 360371, 657721, 714491, 776161, 892991, 957791, 976921, 981431, 1040461, 1079441, 1172611, 1394761, 1468091
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1998

Keywords

Comments

All terms are a product of at least two terms of A020456. - David A. Corneth, Oct 09 2020

Crossrefs

Programs

  • Magma
    [n: n in [4..1500000] | not IsPrime(n) and forall{f: f in PrimeDivisors(n) | Intseq(f) subset [1,8]}]; // Bruno Berselli, Aug 26 2013
  • Mathematica
    dpfQ[n_]:=Module[{d=Union[Flatten[IntegerDigits/@Transpose[FactorInteger[n]][[1]]]]}, !PrimeQ[n]&&(d == {1}||d == {8}||d == {1, 8})]; Select[Range[2, 1500000], dpfQ] (* Vincenzo Librandi, Aug 25 2013 *)

Formula

Sum_{n>=1} 1/a(n) = Product_{p in A020456} (p/(p - 1)) - Sum_{p in A020456} 1/p - 1 = 0.0101097220... . - Amiram Eldar, May 18 2022

Extensions

More terms from Vincenzo Librandi, Aug 25 2013

A036935 Smallest n-digit prime containing only digits 1 and 8, or 0 if no such prime exists.

Original entry on oeis.org

0, 11, 181, 1181, 18181, 0, 1111181, 11818181, 111111181, 1111111181, 11111188811, 0, 1111111118111, 11111111818181, 111111111111881, 1111111111111181, 11111111111188111, 0, 1111111111111111111
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

a(6k) = 0 as any 6k-digit number containing only digits 1 or 8 is divisible by 7. - Jinyuan Wang, Mar 09 2020

Crossrefs

Showing 1-10 of 11 results. Next