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.

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

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

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

A074386 Numbers k such that sigma(k) is the square of a prime.

Original entry on oeis.org

3, 81, 400
Offset: 1

Views

Author

Labos Elemer, Aug 22 2002

Keywords

Comments

The next term, if it exists, is > 10^11. - Donovan Johnson, Aug 24 2012
a(4), if it exists, satisfies sigma(a(4)) > 10^36. - Hiroaki Yamanouchi, Sep 10 2014
If n belongs to this sequence, it may have at most two distinct prime divisors. If n=p^k, then sigma(p^k) = (p^(k+1)-1)/(p-1) = r^2 for some prime r. For k=1, it trivially has the only solution n=3; while for k>1 it is a partial case of the Nagell-Ljunggren equation and has the only prime solution r=11 (see Bennett-Levin 2015) corresponding to n=3^4=81. If n=p^k*q^m, then sigma(n) = (p^(k+1)-1)/(p-1) * (q^(m+1)-1)/(q-1) = r^2 for some prime r, implying that (p^(k+1)-1)/(p-1) = (q^(m+1)-1)/(q-1) = r. Here k+1 and m+1 must be odd distinct primes. The Goormaghtigh conjecture would imply that its only solution is n=400 with (p,k,q,m)=(5,2,2,4). - Max Alekseyev, Apr 24 2015

Examples

			sigma[{3,81,400}]={4,121,961}.
		

Crossrefs

Programs

  • Mathematica
    Do[s=DivisorSigma[1, n]; If[PrimeQ[Sqrt[s]], Print[n]], {n, 1, 1000000}] (* Corrected by N. J. A. Sloane, May 26 2008 *)

Extensions

Definition corrected by Juan Lopez, May 26 2008
Edited by N. J. A. Sloane, May 26 2008

A126589 Numbers n>1 such that prime of the form (n^k-1)/(n-1) does not exist for k>2; or A128164(n) = 0.

Original entry on oeis.org

4, 9, 16, 25, 32, 36, 49, 64, 81, 100, 121, 125, 144, 169, 196, 216, 225, 243, 256, 289, 324, 343, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1000, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1728, 1764, 1849, 1936, 2025
Offset: 1

Views

Author

Alexander Adamchuk, Mar 13 2007

Keywords

Comments

Appears to be the union of the perfect squares k^2 (for k>1) and the prime powers p^k (for k>1) with some exceptions, such as 2^3, 3^3, 2^7, etc.
The perfect powers except those of the form n^(p^m) where p and (n^(p^(m+1))-1)/(n^(p^m)-1) are primes, p>2 and m>=1. - Max Alekseyev, Mar 09 2009

Examples

			A128164 begins with offset 2: {3, 3, 0, 3, 3, 5, 3, 0, 19, 17, 3, 5, 3, 3, 0, 3, ...}. Thus a(1) = 4, a(2) = 9, a(3) = 16.
		

Crossrefs

Extensions

Extended by Max Alekseyev, Mar 09 2009

A065813 Least m such that (p^(2*m+1)-1)/(p-1) is a prime, where p = prime(n).

Original entry on oeis.org

1, 1, 1, 2, 8, 2, 1, 9, 2, 2, 3, 6, 1, 2, 63, 5, 1, 3, 9, 1, 2, 2, 2, 1, 8, 1, 9, 8, 8, 11, 2, 1, 5, 81, 3, 6, 8, 3, 1, 1, 9, 8, 8, 2, 15, 288, 20, 119, 2, 5, 56, 2, 8, 3, 11, 2
Offset: 1

Views

Author

Vladeta Jovovic and Labos Elemer, Nov 13 2001

Keywords

Examples

			a(5) = 8 because ithprime(5) = 11, (11^(2*m+1)-1)/10 is not a prime for m = 1..7 and (11^17-1)/10 = 50544702849929377 is a prime.
		

Crossrefs

Programs

  • Mathematica
    Do[p=Prime[w]; s=DivisorSigma[1, (p^r)^2]; z=DivisorSigma[0, (p^r)^2]; If[PrimeQ[s], Print[{p, r, p^r, s, z}]], {w, 1, 100}, {r, 1, 100}] For w=12, this prints out first {37, 6, 2565726409, 6765811783780036261, 13}.
    lm[n_]:=Module[{m=1},While[!PrimeQ[(n^(2m+1)-1)/(n-1)],m++];m]; lm/@Prime[ Range[ 56]] (* Harvey P. Dale, Feb 16 2014 *)
  • PARI
    { allocatemem(932245000); for (n=1, 100, x=prime(n); s=x^2; q=x - 1; m=1; while (!isprime(((x*=s) - 1)/q), m++); write("b065813.txt", n, " ", m) ) } \\ Harry J. Smith, Oct 31 2009
Showing 1-6 of 6 results.