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.

A123488 Smallest prime of the form (q^p-1)/(q-1), where p = prime(n) and q is also prime (q = A123487(n)).

Original entry on oeis.org

3, 7, 31, 127, 12207031, 8191, 131071, 524287, 1484520425576434196455942238665054573307722183, 10333327940128053377465393536117755205850522803739374960650929
Offset: 1

Views

Author

Alexander Adamchuk, Sep 30 2006

Keywords

Comments

Corresponding smallest primes q are listed in A123487.
a(n) coincides with A084732(n) when A066180(n) is prime or 0.

Crossrefs

Formula

a(n) = (A123487(n)^prime(n) - 1) / (A123487(n) - 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

A123627 Smallest prime q such that (q^p+1)/(q+1) is prime, where p = prime(n); or 0 if no such prime q exists.

Original entry on oeis.org

0, 2, 2, 2, 2, 2, 2, 2, 2, 7, 2, 19, 61, 2, 7, 839, 89, 2, 5, 409, 571, 2, 809, 227, 317, 2, 5, 79, 23, 4073, 2, 281, 89, 739, 1427, 727, 19, 19, 2, 281, 11, 2143, 2, 1013, 4259, 2, 661, 1879, 401, 5, 4099, 1579, 137, 43, 487, 307, 547, 1709, 43, 3, 463, 2161, 353, 443, 2
Offset: 1

Views

Author

Alexander Adamchuk, Oct 04 2006, Aug 05 2008

Keywords

Comments

a(1) = 0 because such a prime does not exist, Mod[n^2+1,n+1] = 2 for n>1.
Corresponding primes (q^p+1)/(q+1), where prime q = a(n) and p = Prime[n], are listed in A123628[n] = {1,3,11,43,683,2731,43691,174763,2796203,402488219476647465854701,715827883,...}.
a(n) coincides with A103795[n] when A103795[n] is prime.
a(n) = 2 for n = PrimePi[A000978[k]] = {2,3,4,5,6,7,8,9,11,14,18,22,26,31,39,43,46,65,69,126,267,380,495,762,1285,1304,1364,1479,1697,4469,8135,9193,11065,11902,12923,13103,23396,23642,31850,...}.
Corresponding primes of the form (2^p + 1)/3 are the Wagstaff primes that are listed in A000979[n] = {3,11,43,683,2731,43691,174763,2796203,715827883,...}.

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,q;
      p:= ithprime(n);
      q:= 1;
      do
       q:= nextprime(q);
       if isprime((q^p+1)/(q+1)) then return q fi
      od
    end proc:
    f(1):= 0:
    map(f, [$1..70]); # Robert Israel, Jul 31 2019
  • Mathematica
    a(1) = 0, for n>1 Do[p=Prime[k]; n=1; q=Prime[n]; cp=(q^p+1)/(q+1); While[ !PrimeQ[cp], n=n+1; q=Prime[n]; cp=(q^p+1)/(q+1)]; Print[q], {k, 2, 61}]
    Do[p=Prime[k]; n=1; q=Prime[n]; cp=(q^p+1)/(q+1); While[ !PrimeQ[cp], n=n+1; q=Prime[n]; cp=(q^p+1)/(q+1)]; Print[{k,q}], {k, 1, 134}]
    spq[n_]:=Module[{p=Prime[n],q=2},While[!PrimeQ[(q^p+1)/(q+1)],q=NextPrime[ q]]; q]; Join[{0},Array[spq,70,2]] (* Harvey P. Dale, Mar 23 2019 *)

Formula

A123628(n) = (a(n)^prime(n) + 1) / (a(n) + 1).

A123628 Smallest prime of the form (q^p+1)/(q+1), where p = prime(n) and q is also prime (q = A123627(n)); or 1 if such a prime does not exist.

Original entry on oeis.org

1, 3, 11, 43, 683, 2731, 43691, 174763, 2796203, 402488219476647465854701, 715827883, 10300379826060720504760427912621791994517454717, 254760179343040585394724919772965278539769280548173566545431025735121201
Offset: 1

Views

Author

Alexander Adamchuk, Oct 03 2006

Keywords

Comments

a(1) = 1 because such a prime does not exist; (n^2+1) mod (n+1) = 2 for n > 1. a(n) = (A103795(n)^prime(n)+1)/(A103795(n)+1) when A103795(n) is prime. Corresponding smallest primes q such that (q^p+1)/(q+1) is prime, where p = prime(n), are listed in A123627(n) = {0, 2, 2, 2, 2, 2, 2, 2, 2, 7, 2, 19, 61, 2, 7, 839, 1459, 2, 5, 409, 571, 2, ...}. All Wagstaff primes or primes of form (2^p + 1)/3 belong to a(n). Wagstaff primes are listed in A000979(n) = {3, 11, 43, 683, 2731, 43691, 174763, 2796203, 715827883, ...}. Corresponding indices n such that a(n) = (2^prime(n) + 1)/3 are PrimePi(A000978(n)) = {2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 18, 22, 26, 31, 39, 43, 46, 65, 69, 126, 267, 380, 495, 762, 1285, 1304, 1364, 1479, 1697, 4469, 8135, 9193, 11065, 11902, 12923, 13103, 23396, 23642, 31850, ...}. All primes with prime indices in the Jacobsthal sequence A001045(n) belong to a(n).

Crossrefs

Formula

a(n) = (A123627(n)^prime(n) + 1) / (A123627(n) + 1).

A278913 a(n) is the smallest number k with prime sum of divisors such that tau(k) = n-th prime.

Original entry on oeis.org

2, 4, 16, 64, 9765625, 4096, 65536, 262144, 1471383076677527699142172838322885948765175969, 10264895304762966931257013446474591264089923314972889033759201, 1073741824, 18701397461209715023927088008788055619800417991632621566284510161
Offset: 1

Views

Author

Jaroslav Krizek, Nov 30 2016

Keywords

Comments

tau(n) = A000005(n) = the number of divisors of n.
a(11) = 1073741824; a(n) > A023194(10000) = 5896704025969 for n = 9, 10 and n >= 12.

Examples

			a(3) = 16 because 16 is the smallest number with prime values of sum of divisors (sigma(16) = 31) such that tau(16) = 5 = 3rd prime.
		

Crossrefs

Programs

  • Magma
    A278913:=func; [A278913(n): n in[1..8]];
    
  • Mathematica
    A278913[n_] := NestWhile[NextPrime, 2, ! PrimeQ[Cyclotomic[Prime[n], #]] &]^(Prime[n] - 1) (* Davin Park, Dec 28 2016 *)
  • PARI
    a(n) = {my(k=1); while(! (isprime(sigma(k)) && isprime(p=numdiv(k)) && (primepi(p) == n)), k++); k;} \\ Michel Marcus, Dec 03 2016

Formula

a(n) = A123487(n)^(prime(n)-1). - Davin Park, Dec 10 2016

Extensions

More terms from Davin Park, Dec 08 2016

A252503 Smallest prime p such that Phi_n(p) is also prime, where Phi is the cyclotomic polynomial, or 0 if no such p exists.

Original entry on oeis.org

3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 7, 2, 11, 3, 2, 113, 2, 43, 2, 2, 5, 151, 2, 2, 2, 2, 2, 179, 3, 61, 2, 23, 2, 53, 2, 89, 137, 11, 2, 5, 5, 2, 7, 73, 11, 307, 7, 7, 2, 5, 7, 19, 3, 2, 2, 3, 0, 2, 53, 491, 197, 2, 3, 3, 3, 11, 19, 59, 7, 2, 2, 271, 2, 191, 61, 41, 7, 2, 2, 59, 5, 2, 2
Offset: 1

Views

Author

Eric Chen, Dec 18 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n != 2^k (k>5).
Clearly, if n is a power of 2, and Phi_n(2) is not prime, then a(n) = 0.
Records: 3, 5, 7, 11, 113, 151, 179, 307, 491, 839, 1427, 2411, 5987, 6389, 8933, 11813, 18587, 31721, 40763, 46349, ..., . - Robert G. Wilson v, May 21 2017

Crossrefs

Programs

  • Mathematica
    Do[n=1; p=Prime[n]; cp=Cyclotomic[k, p]; While[!PrimeQ[cp], n=n+1; p=Prime[n]; cp=Cyclotomic[k, p]]; Print[p], {k, 1, 300}]
  • PARI
    a(n)=if(n>>valuation(n,2)==1 && n>32, if(ispseudoprime(2^(n/2)+1), 2, 0), my(P=polcyclo(n)); forprime(p=2,, if(ispseudoprime(subst(P,'x,p)), return(p)))) \\ Charles R Greathouse IV, Dec 18 2014
Showing 1-6 of 6 results.