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 13 results. Next

A385776 Primes having only {1, 2, 9} as digits.

Original entry on oeis.org

2, 11, 19, 29, 191, 199, 211, 229, 911, 919, 929, 991, 1129, 1229, 1291, 1999, 2111, 2129, 2221, 2999, 9199, 9221, 9929, 11119, 11299, 12119, 12211, 12911, 12919, 19121, 19211, 19219, 19919, 19991, 21121, 21191, 21211, 21221, 21911, 21929, 21991
Offset: 1

Views

Author

Jason Bard, Jul 09 2025

Keywords

Crossrefs

Supersequence of A020450, A020457, A020460.
Cf. A000040.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 9]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 9}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(n=50, show=0, L=[1, 2, 9])={for(d=1, 1e9, my(t, u=vector(d, i, 10^(d-i))~); forvec(v=vector(d, i, [1+!(L[1]||(i>1&&i
    				
  • Python
    from gmpy2 import is_prime
    from itertools import count, islice, product
    def primes_with(digits):  # generator of primes having only set(digits) as digits
        S, E = "".join(sorted(set(digits) - {'0'})), "".join(sorted(set(digits) & set("1379")))
        yield from (p for p in [2, 3, 5, 7] if str(p) in digits)
        yield from (t for d in count(2) for s in S for m in product(digits, repeat=d-2) for e in E if is_prime(t:=int(s+"".join(m)+e)))
    print(list(islice(primes_with("129"), 41))) # Michael S. Branicky, Jul 11 2025

A004022 Primes of the form (10^k - 1)/9. Also called repunit primes or repdigit primes.

Original entry on oeis.org

11, 1111111111111111111, 11111111111111111111111
Offset: 1

Views

Author

Keywords

Comments

The next term corresponds to k = 317 and is too large to include: see A004023.
Also called repunit primes or prime repunits.
Also, primes with digital product = 1.
The number of 1's in these repunits must also be prime. Since the number of 1's in (10^k-1)/9 is k, if k = p*m then (10^(p*m)-1) = (10^p)^m-1 => (10^p-1)/9 = q and q divides (10^k-1). This follows from the identity a^k - b^k = (a-b)*(a^(k-1) + a^(k-2)*b + ... + b^(k-1)). - Cino Hilliard, Dec 23 2008
A subset of A020449, ..., A020457, A036953, ..., cf. link to OEIS index. - M. F. Hasler, Jul 27 2015
The terms in this sequence, except 11 which is not Brazilian, are prime repunits in base ten, so they are Brazilian primes belonging to A085104 and A285017. - Bernard Schott, Apr 08 2017

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, p. 11. Graham, Knuth and Patashnik, Concrete mathematics, Addison-Wesley, 1994; see p. 146, problem 22.
  • M. Barsanti, R. Dvornicich, M. Forti, T. Franzoni, M. Gobbino, S. Mortola, L. Pernazza and R. Romito, Il Fibonacci N. 8 (included in Il Fibonacci, Unione Matematica Italiana, 2011), 2004, Problem 8.10.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 60.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 114.

Crossrefs

Subsequence of A020449.
A116692 is another version of repunit primes or repdigit primes. - N. J. A. Sloane, Jan 22 2023
See A004023 for the number of 1's.
Cf. A046413.

Programs

  • Magma
    [a: n in [0..300] | IsPrime(a) where a is (10^n - 1) div 9 ]; // Vincenzo Librandi, Nov 08 2014
    
  • Mathematica
    lst={}; Do[If[PrimeQ[p = (10^n - 1)/9], AppendTo[lst, p]], {n, 10^2}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 22 2008 *)
    Select[Table[(10^n - 1) / 9, {n, 500}], PrimeQ] (* Vincenzo Librandi, Nov 08 2014 *)
    Select[Table[FromDigits[PadRight[{},n,1]],{n,30}],PrimeQ] (* Harvey P. Dale, Apr 07 2018 *)
  • PARI
    forprime(x=2,20000,if(ispseudoprime((10^x-1)/9),print1((10^x-1)/9","))) \\ Cino Hilliard, Dec 23 2008
    
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): # generator of terms
        yield from (t for t in (int("1"*k) for k in count(1)) if isprime(t))
    print(list(islice(agen(), 4))) # Michael S. Branicky, Jun 09 2022

Formula

a(n) = A002275(A004023(n)).

Extensions

Edited by Max Alekseyev, Nov 15 2010
Name expanded by N. J. A. Sloane, Jan 22 2023

A260271 Primes having only {1, 4, 9} as digits.

Original entry on oeis.org

11, 19, 41, 149, 191, 199, 419, 449, 491, 499, 911, 919, 941, 991, 1499, 1949, 1999, 4111, 4441, 4919, 4999, 9199, 9419, 9491, 9941, 9949, 11119, 11149, 11411, 11491, 11941, 14149, 14411, 14419, 14449, 19141, 19441, 19919, 19949, 19991, 41141, 41149, 41411
Offset: 1

Views

Author

Vincenzo Librandi, Jul 23 2015

Keywords

Comments

A020452, A020457 and A020466 are subsequences.

Crossrefs

Cf. similar sequences listed in A260266.

Programs

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

A260893 Primes having only {1, 7, 9} as digits.

Original entry on oeis.org

7, 11, 17, 19, 71, 79, 97, 179, 191, 197, 199, 719, 797, 911, 919, 971, 977, 991, 997, 1117, 1171, 1777, 1979, 1997, 1999, 7177, 7717, 7919, 9199, 9719, 9791, 11117, 11119, 11171, 11177, 11197, 11717, 11719, 11777, 11779, 11971, 17117, 17191, 17791, 17911
Offset: 1

Views

Author

Vincenzo Librandi, Aug 11 2015

Keywords

Comments

A020455, A020457 and A020471 are subsequences.
Subsequence of A030096.

Crossrefs

Cf. similar sequences listed in A260889.

Programs

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

A329761 Primes having only {1, 3, 9} as digits.

Original entry on oeis.org

3, 11, 13, 19, 31, 113, 131, 139, 191, 193, 199, 311, 313, 331, 911, 919, 991, 1193, 1319, 1399, 1913, 1931, 1933, 1993, 1999, 3119, 3191, 3313, 3319, 3331, 3391, 3911, 3919, 3931, 9133, 9199, 9311, 9319, 9391, 9931, 11113, 11119, 11131, 11311, 11393, 11399
Offset: 1

Views

Author

Alois P. Heinz, Nov 20 2019

Keywords

Comments

Original name was: Primes whose product of decimal digits is a power of 3.
Primes whose digit set is a subset of {1,3,9}.

Crossrefs

Subsequence of A030096.

Programs

  • Magma
    [p: p in PrimesUpTo(12000) | Set(Intseq(p)) subset [1,3,9]]; // Vincenzo Librandi, Jan 02 2019
  • Mathematica
    Select[Prime[Range[1500]],IntegerQ[Log[3,Times@@IntegerDigits[#]]]&] (* or *) Table[Select[FromDigits/@Tuples[{1,3,9},n],PrimeQ],{n,5}]// Flatten (* Harvey P. Dale, Dec 31 2019 *)

Formula

{ A000040 } intersect { A174813 }.
a(n) in { A000040 } and A007954(a(n)) in { A000244 }.

Extensions

Name changed by Sean A. Irvine, Jul 20 2025

A363023 Primes having only {1, 6, 9} as digits.

Original entry on oeis.org

11, 19, 61, 191, 199, 619, 661, 691, 911, 919, 991, 1619, 1669, 1699, 1999, 6199, 6619, 6661, 6691, 6911, 6961, 6991, 9161, 9199, 9619, 9661, 11119, 11161, 11699, 11969, 16111, 16619, 16661, 16691, 16699, 19661, 19699, 19919, 19961, 19991, 61169, 61961
Offset: 1

Views

Author

Harvey P. Dale, May 13 2023

Keywords

Crossrefs

Cf. A020454 (1 and 6), A020457 (1 and 9).
Cf. A385776.

Programs

  • Mathematica
    Table[Select[Flatten[10#+{1,9}&/@FromDigits/@Tuples[{1,6,9},n]],PrimeQ],{n,4}]//Flatten

A385781 Primes having only {1, 5, 9} as digits.

Original entry on oeis.org

5, 11, 19, 59, 151, 191, 199, 599, 911, 919, 991, 1151, 1511, 1559, 1951, 1999, 5119, 5519, 5591, 9151, 9199, 9511, 9551, 11119, 11159, 11519, 11551, 11959, 15199, 15511, 15551, 15559, 15919, 15959, 15991, 19559, 19919, 19991, 51151, 51199, 51511, 51551
Offset: 1

Views

Author

Jason Bard, Jul 13 2025

Keywords

Crossrefs

Supersequence of A020453, A020457, A020468.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 5, 9]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{1, 5, 9}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [1, 5, 9]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("159"), 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
    

A284294 Numbers using only digits 1 and 9.

Original entry on oeis.org

1, 9, 11, 19, 91, 99, 111, 119, 191, 199, 911, 919, 991, 999, 1111, 1119, 1191, 1199, 1911, 1919, 1991, 1999, 9111, 9119, 9191, 9199, 9911, 9919, 9991, 9999, 11111, 11119, 11191, 11199, 11911, 11919, 11991, 11999, 19111, 19119, 19191, 19199, 19911, 19919
Offset: 1

Views

Author

Jaroslav Krizek, Mar 25 2017

Keywords

Comments

Product of digits of terms is a power of 9; subsequence of A284295.
Prime terms are in A020457.

Crossrefs

Cf. Numbers using only digits 1 and k for k = 0 and k = 2 - 9: A007088 (k = 0), A007931 (k = 2), A032917 (k = 3), A032822 (k = 4) , A276037 (k = 5), A284293 (k = 6), A276039 (k = 7), A213084 (k = 8), this sequence (k = 9).

Programs

  • Magma
    [n: n in [1..20000] | Set(IntegerToSequence(n, 10)) subset {1, 9}];
  • Mathematica
    Join @@ (FromDigits /@ Tuples[{1,9}, #] & /@ Range[5]) (* Giovanni Resta, Mar 25 2017 *)

Formula

The sum of first 2^n terms is (5*20^n + 38*10^n - 95*2^n + 1420)/171. - Giovanni Resta, Mar 25 2017

A036309 Composite numbers whose prime factors contain no digits other than 1 and 9.

Original entry on oeis.org

121, 209, 361, 1331, 2101, 2189, 2299, 3629, 3781, 3971, 6859, 10021, 10109, 10901, 14641, 17309, 17461, 18829, 21989, 23111, 24079, 25289, 36481, 37981, 38009, 39601, 39919, 41591, 43681, 68951, 71839, 75449, 101189, 110231, 111199, 119911
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1998

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    Select[Range[120000],CompositeQ[#]&&SubsetQ[{1,9},Union[Flatten[ IntegerDigits /@ FactorInteger[ #][[All,1]]]]]&] (* Harvey P. Dale, Mar 30 2019 *)

Formula

Sum_{n>=1} 1/a(n) = Product_{p in A020457} (p/(p - 1)) - Sum_{p in A020457} 1/p - 1 = 0.0200389643... . - Amiram Eldar, May 18 2022
Showing 1-10 of 13 results. Next