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

A055558 Primes of the form 1999...999.

Original entry on oeis.org

19, 199, 1999, 199999, 19999999, 199999999999999999999999999, 1999999999999999999999999999, 199999999999999999999999999999999999999999999999999999
Offset: 1

Views

Author

Labos Elemer, Jul 10 2000

Keywords

Comments

Primes of the form 2*10^k - 1.

Examples

			2*10^n - 1 is prime for {1,2,3,5,7,26,27,53,147,236,248,386,401}; in each of these numbers, the digit '9' appears n times.
		

Crossrefs

Subsequence of A090149.
Primes in A067272.

Programs

Formula

a(n) = 2*10^A002957(n) - 1 = A067272(A002957(n) + 1). - Elmo R. Oliveira, Jun 14 2025

A120378 Integers n such that 2*11^n-1 is prime.

Original entry on oeis.org

2, 8, 248, 2474, 2900, 6600, 24746, 105704
Offset: 1

Views

Author

Walter Kehowski, Jun 28 2006

Keywords

Comments

See comments for A057472. Examined in base 12, all n must be even and all primes must be 1-primes. For example, 241 is 181 in base 12.
a(9) > 2*10^5. - Robert Price, Nov 06 2015

Examples

			a(1)=2 since 2*11^2-1=241 is the first prime of this form.
		

Crossrefs

Programs

  • Maple
    for w to 1 do for k from 1 to 2000 do n:=2*11^k-1; if isprime(n) then printf("%d, %d",k,n) fi od od;
  • Mathematica
    Select[Range[0, 200000], PrimeQ[2*11^# - 1] &] (* Robert Price, Nov 06 2015 *)

Formula

a(n) = n-th integer k such that 2*11^k-1 is prime.

Extensions

More terms from Ryan Propper, Jan 14 2008
a(7)-a(8) from Robert Price, Nov 06 2015

A120375 Integers k such that 2*5^k - 1 is prime.

Original entry on oeis.org

4, 6, 16, 24, 30, 54, 96, 178, 274, 1332, 2766, 3060, 4204, 17736, 190062, 223536, 260400, 683080
Offset: 1

Views

Author

Walter Kehowski, Jun 28 2006

Keywords

Comments

See comments for A057472. Examined in base 12, all n must be even and all primes must be 1-primes. For example, 1249 is 881 in base 12.
a(16) > 2*10^5. - Robert Price, Mar 14 2015

Examples

			a(1) = 4 since 2*5^4 - 1 = 1249 is the first prime.
		

Crossrefs

Integers k such that 2*b^k - 1 is prime: A090748 (b=2), A003307 (b=3), this sequence (b=5), A057472 (b=6), A002959 (b=7), A002957 (b=10), A120378 (b=11).
Primes of the form 2*b^k - 1: A000668 (b=2), A079363 (b=3), A120376 (b=5), A158795 (b=7), A055558 (b=10), A120377 (b=11).
Cf. also A000043, A002958.

Programs

  • Magma
    [n: n in [0..2800] |IsPrime(2*5^n - 1)]; // Vincenzo Librandi, Sep 23 2018
  • Maple
    for w to 1 do for k from 1 to 2000 do n:=2*5^k-1; if isprime(n) then printf("%d, %d ",k,n) fi od od;
  • Mathematica
    Select[Range[0, 100], PrimeQ[2*5^# - 1] &] (* Robert Price, Mar 14 2015 *)
  • PARI
    isok(k) = ispseudoprime(2*5^k-1); \\ Altug Alkan, Sep 22 2018
    

Formula

a(n) = 2*A002958(n).

Extensions

More terms from Ryan Propper, Mar 28 2007
a(14) from Herman Jamke (hermanjamke(AT)fastmail.fm), May 02 2007
a(15) from Robert Price, Mar 14 2015
a(16)-a(18) from Jorge Coveiro and Tyler NeSmith, Jun 14 2020

A120377 Primes of the form 2*11^k-1.

Original entry on oeis.org

241, 428717761
Offset: 1

Views

Author

Walter Kehowski, Jun 28 2006

Keywords

Comments

See comments for A057472. Examined in base 12, all n must be even and all primes must be 1-primes. For example, 241 is 181 in base 12.
The values of k < 1000 that yield primes are 2, 8, 248. - T. D. Noe, Nov 16 2006

Examples

			a(1) = 241 since 2*11^2-1 = 241 is the first prime.
		

Crossrefs

Programs

  • Maple
    for w to 1 do for k from 1 to 2000 do n:=2*11^k-1; if isprime(n) then printf("%d, %d",k,n) fi od od;
  • Mathematica
    Select[2*11^Range[1000]-1, PrimeQ] (* T. D. Noe, Nov 16 2006 *)

Formula

a(n) = n-th number such that 2*11^k-1 that is prime for some k.
a(n) = 2*11^A120378(n)-1. - R. J. Mathar, Mar 06 2010

Extensions

Corrected by T. D. Noe, Nov 16 2006

A119591 Least k such that 2*n^k - 1 is prime.

Original entry on oeis.org

1, 1, 1, 4, 1, 1, 2, 1, 1, 2, 1, 2, 4, 1, 1, 2, 2, 1, 10, 1, 1, 6, 1, 2, 6, 1, 2, 136, 1, 1, 6, 6, 1, 6, 1, 1, 2, 2, 1, 2, 1, 2, 4, 1, 2, 4, 4, 1, 2, 1, 1, 44, 1, 1, 2, 1, 3, 2, 5, 3, 2, 2, 1, 4, 1, 768, 4, 1, 1, 52, 34, 2, 132, 1, 1, 14, 7, 1, 2, 2, 1, 8, 1, 2, 10, 1, 24, 60, 1, 1, 2, 3, 5, 2, 1, 1, 2, 1, 1
Offset: 2

Views

Author

Pierre CAMI, Jun 01 2006

Keywords

Comments

From Eric Chen, Jun 01 2015: (Start)
Conjecture: a(n) is defined for all n.
a(303) > 10000, a(304)..a(360) = {1, 2, 11, 1, 990, 1, 1, 2, 2, 4, 74, 5, 1, 10, 6, 6, 4, 1, 1, 2, 1, 9, 12, 1, 80, 2, 1, 1, 2, 14, 3, 2, 3, 1, 12, 1, 60, 36, 1, 8, 4, 34, 1, 522, 3, 15, 14, 1, 6, 2, 3, 1, 4, 5, 4, 10, 1}.
a(n) = 1 if and only if n is in A006254. (End)
From Eric Chen, Sep 16 2021: (Start)
Now a(303) is known to be 40174, also other terms > 10000: a(383) = 20956, a(515) = 58466, a(522) = 62288, a(578) = 129468, a(581) > 400000, a(590) = 15526, a(647) = 21576, a(662) = 16590, a(698) = 127558, a(704) = 62034, see the a-file and the references.
a(n) = 2 if and only if n is in A066049 but not in A006254.
a(n) = 3 if and only if n is in A214289 but not in A006254 or A066049. (End)

Crossrefs

Numbers r such that 2*k^r-1 is prime: A090748 (k=2), A003307 (k=3), A146768 (k=4), A120375 (k=5), A057472 (k=6), A002959 (k=7), ... (k=8), ... (k=9), A002957 (k=10), A120378 (k=11), ... (k=12), A174153 (k=13), A273517 (k=14), ... (k=15), ... (k=16), A193177 (k=17), A002958 (k=25).

Programs

  • Mathematica
    f[n_] := Block[{k = 0}, While[ ! PrimeQ[2*n^k - 1], k++ ]; k ]; Table[f[n], {n, 2, 106}] (* Ray Chandler, Jun 08 2006 *)
  • PARI
    a(n) = for(k=1, 2^24, if(ispseudoprime(2*n^k-1), return(k))) \\ Eric Chen, Jun 01 2015

Formula

From Eric Chen, Sep 16 2021: (Start)
a(6*n) = A098873(n).
a(2^n) = A279095(n).
a(A006254(n)) = 1.
a(A066049(n)) <= 2.
a(A214289(n)) <= 3. (End)

Extensions

Corrected and extended by Ray Chandler, Jun 08 2006

A171268 Primes q such that q^p ends with q, where p is the product of the digits of q.

Original entry on oeis.org

5, 11, 37, 61, 73, 199, 751, 3761, 7993, 79193, 7799999, 1111111111111111111, 11111111111111111111111, 199999999999999999999999999
Offset: 1

Views

Author

Farideh Firoozbakht, Apr 28 2010

Keywords

Comments

All repunit primes (A004022) are in the sequence.
Number 2*10^k-1 is a term whenever k is an even term of A002957. - Max Alekseyev, Jun 08 2018
a(15) = 38*10^152-1, a(16) = 2*10^236-1, a(17) = 2*10^248-1, a(18) = (10^317-1)/9, a(19) = 38*10^352-1, a(20) = 2*10^386-1, a(21) = 78*10^535-1, a(22) = 2*10^546-1 are too large to include here. - Max Alekseyev, Jun 26 2018

Examples

			7799999^(7*7*9*9*9*9*9) == 7799999 (mod 10^7), so 7799999 is a term.
		

Crossrefs

Programs

  • Mathematica
    Do[n=Prime[m];a=IntegerDigits[n];If[PowerMod[n,Apply[Times,a],10^Length[a]]==n,Print[n]],{m,100000000}]

Extensions

a(12)-a(14) from Max Alekseyev, Aug 18 2013

A120376 Primes of the form 2*5^k - 1.

Original entry on oeis.org

1249, 31249, 305175781249, 119209289550781249, 1862645149230957031249, 111022302462515654042363166809082031249, 25243548967072377773175314089049159349542605923488736152648925781249
Offset: 1

Views

Author

Walter Kehowski, Jun 28 2006

Keywords

Comments

See comments for A057472. Examined in base 12, all n must be even and all primes must be 1-primes. For example, 1249 is 881 in base 12.
The next term has 125 digits. - Harvey P. Dale, Jan 26 2019

Examples

			a(1) = 4 since 2*5^4 - 1 = 1249 is the first prime.
		

Crossrefs

Integers k such that 2*b^k - 1 is prime: A090748 (b=2), A003307 (b=3), A120375 (b=5), A057472 (b=6), A002959 (b=7), A002957 (b=10), A120378 (b=11).
Primes of the form 2*b^k - 1: A000668 (b=2), A079363 (b=3), this sequence (b=5), A158795 (b=7), A055558 (b=10), A120377 (b=11).
Cf. also A000043, A002958.

Programs

  • Maple
    for w to 1 do for k from 1 to 2000 do n:=2*5^k-1; if isprime(n) then printf("%d, %d",k,n) fi od od;
  • Mathematica
    Select[2*5^Range[100]-1,PrimeQ] (* Harvey P. Dale, Jan 26 2019 *)
  • PARI
    for(k=1, 1e3, if(ispseudoprime(p=2*5^k-1), print1(p, ", "))); \\ Altug Alkan, Sep 22 2018

Formula

a(n) = 2*5^A120375(n) - 1 = 2*5^(2*A002958(n)) - 1. - Jianing Song, Sep 22 2018

A171269 Intersection of A171267 and A171268.

Original entry on oeis.org

5, 751, 79193
Offset: 1

Views

Author

Farideh Firoozbakht, Apr 28 2010

Keywords

Comments

Primes p such that both numbers p^A007953(p) and p^A007954(p) end with p.
a(4) > prime(10^8)=2038074743.
Number 2*10^k-1 is a term as soon as k is a multiple of 10 and belongs to A002957. In particular, a(4) <= 2*10^3020 - 1. - Max Alekseyev, Jun 07 2018

Crossrefs

A319535 Primes of the form 2*6^k - 1.

Original entry on oeis.org

11, 71, 431, 2591, 15551, 4353564671, 5642219814911, 341163456359156416511, 2046980738154938499071, 20628849596981071092343898111, 26734989077687468135677691953151, 207891275068097752223029732627709951, 269427092488254686881046533485512097791
Offset: 1

Views

Author

Jianing Song, Sep 22 2018

Keywords

Comments

Primes in A164559.
Companion sequence of A057472. There are 49 terms known in this sequence.

Examples

			2*6^1 - 1 = 11, 2*6^2 - 1 = 71, 2*6^3 - 1 = 431, 2*6^4 - 1 = 2591 and 2*6^5 - 1 = 15551 are primes, but 2*6^6 - 1 = 93311 = 23*4057 is not.
		

Crossrefs

Integers k such that 2*b^k - 1 is prime: A090748 (b=2), A003307 (b=3), A120375 (b=5), A057472 (b=6), A002959 (b=7), A002957 (b=10), A120378 (b=11).
Primes of the form 2*b^k - 1: A000668 (b=2), A079363 (b=3), A120376 (b=5), this sequence (b=6), A158795 (b=7), A055558 (b=10), A120377 (b=11).

Programs

  • Magma
    [k: n in [1..100] | IsPrime(k) where k is 2*6^n-1];  // K. D. Bajpai, Nov 15 2019
  • Maple
    A319535:= n-> (2*6^n-1): select(isprime, [seq((A319535(n), n=1..200))]);  # K. D. Bajpai, Nov 15 2019
  • Mathematica
    Select[Table[2*6^k-1,{k,1600}], PrimeQ[#]&]  (* K. D. Bajpai, Nov 15 2019 *)
  • PARI
    for(n=1, 99, my(t); if(ispseudoprime(t=2*6^n-1), print1(t", ")))
    

Formula

a(n) = 2*6^A057472(n) - 1.

A129990 Primes p such that the smallest integer whose sum of decimal digits is p is prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 23, 29, 31, 41, 43, 71, 79, 97, 173, 179, 257, 269, 311, 389, 691, 4957, 8423, 11801, 14621, 25621, 26951, 38993, 75743, 102031, 191671, 668869
Offset: 1

Views

Author

J. M. Bergot, Jun 14 2007

Keywords

Examples

			The smallest integer whose sum of digits is 17 is 89; 89 is prime, therefore 17 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1000]],PrimeQ[FromDigits[Join[{Mod[ #,9]},Table[9,{i,1,Floor[ #/9]}]]]] &]
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def A051885(n): return ((n%9)+1)*10**(n//9)-1 # from Chai Wah Wu
    def agen(startp=2):
        p = startp
        while True:
            if isprime(A051885(p)): yield p
            p = nextprime(p)
    print(list(islice(agen(), 23))) # Michael S. Branicky, Jul 27 2022
    
  • Sage
    sorted( filter(is_prime, sum(([9*t+k for t in oeis(seq).first_terms()] for seq,k in (('A002957',1), ('A056703',2), ('A056712',4), ('A056716',5), ('A056721',7), ('A056725',8))), [3])) ) # Max Alekseyev, Feb 05 2025

Formula

Primes p such that (p mod 9 + 1) * 10^[p/9] - 1 is prime. Therefore the sequence consists of the term 3 and the primes of the forms A002957(k)*9+1, A056703(k)*9+2, A056712(k)*9+4, A056716(k)*9+5, A056721(k)*9+7, A056725(k)*9+8. - Max Alekseyev, Nov 09 2009

Extensions

Edited, corrected and extended by Stefan Steinerberger, Jun 23 2007
Extended by D. S. McNeil, Mar 20 2009
a(29)-a(33) from Max Alekseyev, Nov 09 2009
Showing 1-10 of 11 results. Next