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

A065507 Smallest prime q such that (p^q+1)/(p+1) is a prime, where p = prime(n).

Original entry on oeis.org

3, 3, 5, 3, 5, 3, 7, 17, 11, 7, 109, 5, 17, 5, 5, 21943, 17, 7, 3, 5, 7, 3, 19, 13
Offset: 1

Views

Author

Vladeta Jovovic, Nov 26 2001

Keywords

Comments

It is known that for the prime 97, a(25) > 31000. - T. D. Noe, Feb 13 2004

Crossrefs

Cf. A065854.
Cf. A084742 (least k such that (n^k+1)/(n+1) is prime).

Programs

  • Mathematica
    Do[p = Prime[n]; k = 1; While[ !PrimeQ[ (p^Prime[k] + 1)/(p + 1)], k++ ]; Print[ Prime[k]], {n, 1, 15} ]

Extensions

More terms from T. D. Noe, Jan 22 2004

A084741 Smallest prime of the form (n^k+1)/(n+1), or 0 if no such prime exists.

Original entry on oeis.org

3, 7, 13, 521, 31, 43, 0, 73, 9091, 13421, 19141, 157, 7027567, 211, 241, 22796593, 307, 274019342889240109297, 152381, 421, 463, 39700406579747, 183458857, 601, 135938684703251, 0, 757, 574995877
Offset: 2

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 15 2003

Keywords

Comments

When n is a power (greater than 2) of a prime, then (n^k+1)/(n+1) will usually be composite for all k, which is the case for n = 8, 27, 32, 64, 125. The next term, a(30), is a 204-digit number. - T. D. Noe, Jan 22 2004

Examples

			a(7)= 43 = (7^3 +1 )/(7+1) = 1 - 7 + 7^2 is a prime.
		

Crossrefs

Cf. A084742 (least k such that (n^k+1)/(n+1) is prime).

Extensions

More terms from T. D. Noe, Jan 22 2004

A126659 Least number k > 0 such that ((2n-1)^k + 1)/(2n) is prime, or 0 if no such prime exists.

Original entry on oeis.org

3, 5, 3, 3, 5, 3, 3, 7, 17, 3, 11, 3, 0, 7, 109, 5, 11, 5, 3, 17, 5, 103, 5, 7, 3, 21943, 3, 53, 17, 7, 3, 19, 3, 11, 5, 7, 5, 37, 3, 3, 19, 167, 7, 13, 3, 89, 43
Offset: 2

Views

Author

Alexander Adamchuk, Feb 09 2007, Feb 10 2007

Keywords

Comments

All terms are odd primes.
a(49) > 143800. - Robert Price, Mar 29 2019

Crossrefs

Programs

  • Mathematica
    A126659[n_] := Module[{k = 1}, If[n == 14, Return[0]]; While[! PrimeQ[((2 n - 1)^k + 1)/(2 n)], k++]; k]; Table[A126659[n], {n, 2, 48}] (* Robert Price, Oct 29 2018 *)
  • PARI
    a(n) = {if (n==14, return(0)); my(k=3); while (! isprime(((2*n-1)^k + 1)/(2*n)), k = nextprime(k+1)); k;} \\ Michel Marcus, Nov 23 2018

Formula

a(n) = A084742(2n-1).

A084740 Least k such that (n^k-1)/(n-1) is prime, or 0 if no such prime exists.

Original entry on oeis.org

2, 3, 2, 3, 2, 5, 3, 0, 2, 17, 2, 5, 3, 3, 2, 3, 2, 19, 3, 3, 2, 5, 3, 0, 7, 3, 2, 5, 2, 7, 0, 3, 13, 313, 2, 13, 3, 349, 2, 3, 2, 5, 5, 19, 2, 127, 19, 0, 3, 4229, 2, 11, 3, 17, 7, 3, 2, 3, 2, 7, 3, 5, 0, 19, 2, 19, 5, 3, 2, 3, 2, 5, 5, 3, 41, 3, 2, 5, 3, 0, 2, 5, 17, 5, 11, 7, 2, 3, 3, 4421, 439, 7, 5, 7, 2, 17, 13, 3, 2, 3, 2, 19, 97, 3, 2, 17, 2, 17, 3, 3, 2, 23, 29, 7, 59
Offset: 2

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 15 2003

Keywords

Comments

When (n^k-1)/(n-1) is prime, k must be prime. As mentioned by Dubner, when n is a perfect power, then (n^k-1)/(n-1) will usually be composite for all k, which is the case for n = 9, 25, 32, 49, 64, 81, 121, 125, 144, 169, 216, 225, 243, 289, 324, 343, ... - T. D. Noe, Jan 30 2004
a(152) > prime(1100) or 0. - Derek Orr, Nov 29 2014
a(n)=2 if and only if n=p-1, where p is an odd prime; that is, n belongs to A006093, except 2. - Thomas Ordowski, Sep 19 2015
Probably a(152) = 270217 since (152^270217-1)/(152-1) has been shown to be probably prime. - Michael Stocker, Jan 24 2019

Examples

			a(7) = 5 as (7^5 - 1 )/(7 - 1) = 2801 = 1 + 7 + 7^2 + 7^3 + 7^4 is a prime but no smaller partial sum yields a prime.
		

Crossrefs

Programs

  • PARI
    a(n) = {l=List([9, 25, 32, 49, 64, 81, 121, 125, 144, 169, 216, 225, 243, 289, 324, 343]); for(q=1, #l, if(n==l[q], return(0))); k=1; while(k, s=(n^prime(k)-1)/(n-1); if(ispseudoprime(s), return(prime(k))); k++)}
    n=2; while(n<361, print1(a(n), ", "); n++) \\ Derek Orr, Jul 13 2014

Extensions

More terms from T. D. Noe, Jan 23 2004

A126856 Numbers n such that (31^n + 1)/32 is prime.

Original entry on oeis.org

109, 461, 1061, 50777
Offset: 1

Views

Author

Alexander Adamchuk, Mar 23 2007

Keywords

Comments

All terms are primes.
a(5) > 10^5. - Robert Price, Jul 12 2013

Crossrefs

Programs

  • Mathematica
    Do[ p=Prime[n]; If[ PrimeQ[ (31^p + 1)/32 ], Print[p] ], {n,1,1100} ]
  • PARI
    is(n)=isprime((31^n+1)/32) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

a(4) from Robert Price, Jul 12 2013

A229145 Numbers k such that (36^k + 1)/37 is prime.

Original entry on oeis.org

31, 191, 257, 367, 3061, 110503, 1145393
Offset: 1

Views

Author

Robert Price, Sep 15 2013

Keywords

Comments

All such numbers k are prime.
Note that a(6) = 110503 corresponds to (36^110503 + 1)/37, which is only a probable prime with 171975 digits.
The primes corresponding to the terms of this sequence have 1 as their last digit and an even number as their next-to-last digit. - Iain Fox, Dec 08 2017

Crossrefs

Programs

  • Mathematica
    Do[ p=Prime[n]; If[ PrimeQ[ (36^p + 1)/37 ], Print[p] ], {n, 1, 9592} ]
  • PARI
    is(n)=isprime((36^n+1)/37) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

a(6) = 110503 (posted by Lelio R. Paula on primenumbers.net) from Paul Bourdelais, Dec 08 2017
a(7) from Paul Bourdelais, Nov 03 2023

A185240 Numbers k such that (35^k + 1)/36 is prime.

Original entry on oeis.org

11, 13, 79, 127, 503, 617, 709, 857, 1499, 3823, 135623, 280979
Offset: 1

Views

Author

Robert Price, Aug 29 2013

Keywords

Comments

All terms are primes. a(11) > 10^5.

Crossrefs

Programs

  • Mathematica
    Do[ p=Prime[n]; If[ PrimeQ[ (35^p + 1)/36 ], Print[p] ], {n, 1, 9592} ]
  • PARI
    is(n)=isprime((35^n+1)/36) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

a(11)=135623 found as probable prime and added by Paul Bourdelais, Jul 05 2018
a(12) from Paul Bourdelais, Sep 13 2021

A128164 Least k > 2 such that (n^k - 1)/(n-1) is prime, or 0 if no such prime exists.

Original entry on oeis.org

3, 3, 0, 3, 3, 5, 3, 0, 19, 17, 3, 5, 3, 3, 0, 3, 25667, 19, 3, 3, 5, 5, 3, 0, 7, 3, 5, 5, 5, 7, 0, 3, 13, 313, 0, 13, 3, 349, 5, 3, 1319, 5, 5, 19, 7, 127, 19, 0, 3, 4229, 103, 11, 3, 17, 7, 3, 41, 3, 7, 7, 3, 5, 0, 19, 3, 19, 5, 3, 29, 3, 7, 5, 5, 3, 41, 3, 3, 5, 3, 0, 23, 5, 17, 5, 11, 7, 61, 3, 3
Offset: 2

Views

Author

Alexander Adamchuk, Feb 20 2007

Keywords

Comments

a(n) = A084740(n) for all n except n = p-1, where p is an odd prime, for which A084740(n) = 2.
All nonzero terms are odd primes.
a(n) = 0 for n = {4,9,16,25,32,36,49,64,81,100,121,125,144,...}, which are the perfect powers with exceptions of the form n^(p^m) where p>2 and (n^(p^(m+1))-1)/(n^(p^m)-1) are prime and m>=1 (in which case a(n^(p^m))=p). - Max Alekseyev, Jan 24 2009
a(n) = 3 for n in A002384, i.e., for n such that n^2 + n + 1 is prime.
a(152) > 20000. - Eric Chen, Jun 01 2015
a(n) is the least number k such that (n^k - 1)/(n-1) is a Brazilian prime, or 0 if no such Brazilian prime exists. - Bernard Schott, Apr 23 2017
These corresponding Brazilian primes are in A285642. - Bernard Schott, Aug 10 2017
a(152) = 270217, see the top PRP link. - Eric Chen, Jun 04 2018
a(184) = 16703, a(200) = 17807, a(210) = 19819, a(306) = 26407, a(311) = 36497, a(326) = 26713, a(331) = 25033; a(185) > 66337, a(269) > 63659, a(281) > 63421, and there are 48 unknown a(n) for n <= 1024. - Eric Chen, Jun 04 2018
Six more terms found: a(522)=20183, a(570)=12907, a(684)=22573, a(731)=15427, a(820)=12043, a(996)=14629. - Michael Stocker, Apr 09 2020

Examples

			a(7) = 5 because (7^5 - 1)/6 = 2801 = 11111_7 is prime and (7^k - 1)/6 = 1, 8, 57, 400 for k = 1, 2, 3, 4. - _Bernard Schott_, Apr 23 2017
		

Crossrefs

Cf. A002384, A049409, A100330, A162862, A217070-A217089. (numbers b such that (b^p-1)/(b-1) is prime for prime p = 3 to 97)
A126589 gives locations of zeros.

Programs

  • Mathematica
    Table[Function[m, If[m > 0, k = 3; While[! PrimeQ[(m^k - 1)/(m - 1)], k++]; k, 0]]@ If[Set[e, GCD @@ #[[All, -1]]] > 1, {#, IntegerExponent[n, #]} &@ Power[n, 1/e] /. {{k_, m_} /; Or[Not[PrimePowerQ@ m], Prime@ m, FactorInteger[m][[1, 1]] == 2] :> 0, {k_, m_} /; m > 1 :> n}, n] &@ FactorInteger@ n, {n, 2, 17}] (* Michael De Vlieger, Apr 24 2017 *)
  • PARI
    a052409(n) = my(k=ispower(n)); if(k, k, n>1)
    a052410(n) = if (ispower(n, , &r), r, n)
    is(n) = issquare(n) || (ispower(n) && !ispseudoprime((n^a052410(a052409(n))-1)/(n-1)))
    a(n) = if(is(n), 0, forprime(p=3, 2^16, if(ispseudoprime((n^p-1)/(n-1)), return(p)))) \\ Eric Chen, Jun 01 2015, corrected by Eric Chen, Jun 04 2018, after Charles R Greathouse IV in A052409 and Michel Marcus in A052410

Extensions

a(18) = 25667 found by Henri Lifchitz, Sep 26 2007

A229524 Numbers k such that (38^k + 1)/39 is prime.

Original entry on oeis.org

5, 167, 1063, 1597, 2749, 3373, 13691, 83891, 131591
Offset: 1

Views

Author

Robert Price, Sep 25 2013

Keywords

Comments

All terms are primes. a(9) > 10^5.

Crossrefs

Programs

  • Mathematica
    Do[ p=Prime[n]; If[ PrimeQ[ (38^p + 1)/39 ], Print[p] ], {n, 1, 9592} ]
  • PARI
    is(n)=ispseudoprime((38^n+1)/39) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

a(9)=131591 corresponds to a probable prime discovered by Paul Bourdelais, Jul 03 2018

A229663 Numbers n such that (40^n + 1)/41 is prime.

Original entry on oeis.org

53, 67, 1217, 5867, 6143, 11681, 29959
Offset: 1

Views

Author

Robert Price, Sep 27 2013

Keywords

Comments

All terms are primes.
a(8) > 10^5.

Crossrefs

Programs

  • Mathematica
    Do[ p=Prime[n]; If[ PrimeQ[ (40^p + 1)/41 ], Print[p] ], {n, 1, 9592} ]
  • PARI
    is(n)=ispseudoprime((40^n+1)/41) \\ Charles R Greathouse IV, Feb 17 2017
Showing 1-10 of 20 results. Next