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

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

A055387 2, 3, 5, 7, together with primes such that there is a nontrivial rearrangement of the digits which is a prime.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 31, 37, 71, 73, 79, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 239, 241, 251, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 359, 367, 373, 379, 389, 397, 401, 419, 421
Offset: 1

Views

Author

Asher Auel, May 05 2000

Keywords

Comments

Union of {2, 3, 5, 7} and A225035.

Crossrefs

Extensions

Edited by N. J. A. Sloane, Jan 22 2023

A030291 Primes with at most two different digits.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 113, 131, 151, 181, 191, 199, 211, 223, 227, 229, 233, 277, 311, 313, 331, 337, 353, 373, 383, 433, 443, 449, 499, 557, 577, 599, 661, 677, 727, 733
Offset: 1

Views

Author

Keywords

Comments

The one-digit primes (2, 3, 5, 7) followed by the union of A004022 and A235154. - Jeppe Stig Nielsen, Feb 17 2021

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[#] && Length[Union[RealDigits[#][[1]]]] <= 2 &]
    Select[Prime[Range[200]],Count[DigitCount[#],0]>7&] (* Harvey P. Dale, Jul 14 2017 *)

Extensions

Offset corrected by Arkadiusz Wesolowski, Sep 13 2011

A069598 Primes using only one nonzero digit (with zero digits allowed).

Original entry on oeis.org

2, 3, 5, 7, 11, 101, 10111, 101111, 1011001, 1100101, 10010101, 10011101, 10100011, 10101101, 10110011, 10111001, 11000111, 11100101, 11110111, 11111101, 100100111, 100111001, 101001001, 101001011, 101100011, 101101111
Offset: 1

Views

Author

Amarnath Murthy, Mar 25 2002

Keywords

Comments

From the fifth term onwards only zeros and ones are used.
Any number composed only of a string of zeros and d's where d is a digit > 1 is divisible by d and not prime, so this sequence is the single-digit primes {2,3,5,7} UNION A020449.
The repunit primes (A004022) and A116692 are subsequences.

Crossrefs

Extensions

Edited by Rick L. Shepherd, Sep 04 2009

A088562 Palindromic primes using at most two distinct digits.

Original entry on oeis.org

2, 3, 5, 7, 11, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 11311, 11411, 13331, 15551, 16661, 18181, 19991, 32323, 33533, 35353, 72227, 72727, 74747, 75557, 76667, 77377, 77477, 77977, 78787, 78887, 79997, 94949, 95959
Offset: 1

Views

Author

Amarnath Murthy, Nov 28 2003

Keywords

Comments

Union of A056730 and A116692. - Arkadiusz Wesolowski, Sep 13 2011

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[10000]],PalindromeQ[#]&&Count[DigitCount[#],0]>7&] (* Harvey P. Dale, Jul 31 2023 *)

Extensions

More terms from Arkadiusz Wesolowski, Sep 13 2011

A182183 Numbers k such that the divisors of k are divisible by all digits of their divisors.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22, 24, 33, 44, 55, 66, 77, 88, 99, 132, 264, 1111111111111111111, 2222222222222222222, 3333333333333333333, 4444444444444444444, 5555555555555555555, 6666666666666666666, 7777777777777777777, 8888888888888888888
Offset: 1

Views

Author

Jaroslav Krizek, Apr 17 2012

Keywords

Comments

Subsequence of A209933 (numbers that are divisible by all digits of their divisors).
All divisors of numbers in this sequence are also in the sequence.
The primitive elements of this sequence are A116692. No member of this sequence is divisible by a prime outside this sequence. - Charles R Greathouse IV, Apr 17 2012

Examples

			Number 48 with divisors 1, 2, 3, 4, 6, 8, 12, 16, 24, 48 is not in the sequence because 6 is not a divisor of 16.
		

Crossrefs

Subsequence of A034838. A116692 is a subsequence.
Cf. A209933.
Cf. A027751.
Cf. A027751.

Programs

  • Haskell
    import Data.List ((\\))
    a182183 n = a182183_list !! (n-1)
    a182183_list = f a209933_list [1] where
       f (x:xs) ys =
         if null (a027751_row x \\ ys) then x : f xs (x : ys) else f xs ys
    -- Reinhard Zumkeller, Apr 19 2012
  • PARI
    all(n)=my(v=vecsort(eval(Vec(Str(n))),,8)); if(v[1]==0, return(0)); for(i=1,#v,if(n%v[i],return(0)));1
    is(n)=fordiv(n,d,if(!all(d),return(0)));1 \\ Charles R Greathouse IV, Apr 17 2012
    

Extensions

a(24)-a(31) from Charles R Greathouse IV, Apr 17 2012
Showing 1-6 of 6 results.