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

A058013 Smallest prime p such that (n+1)^p - n^p is prime.

Original entry on oeis.org

2, 2, 2, 3, 2, 2, 7, 2, 2, 3, 2, 17, 3, 2, 2, 5, 3, 2, 5, 2, 2, 229, 2, 3, 3, 2, 3, 3, 2, 2, 5, 3, 2, 3, 2, 2, 3, 3, 2, 7, 2, 3, 37, 2, 3, 5, 58543, 2, 3, 2, 2, 3, 2, 2, 3, 2, 5, 3, 4663, 54517, 17, 3, 2, 5, 2, 3, 3, 2, 2, 47, 61, 19, 23, 2, 2, 19, 7, 2, 7, 3, 2, 331, 2, 179, 5, 2, 5, 3, 2, 2
Offset: 1

Views

Author

Robert G. Wilson v, Nov 13 2000

Keywords

Comments

The terms a(47) and a(60) [were] unknown. The sequence continues at a(48): 2, 3, 2, 2, 3, 2, 2, 3, 2, 5, 3, 4663, a(60)=?, continued at a(61): 17, 3, 2, 5, 2, 3, 3, 2, 2, 47, 61, 19, 23, 2, 2, 19, 7, 2, 7, 3, 2, 331, 2, 179, 5, 2, 5, 3, 2, 2. - Hugo Pfoertner, Aug 27 2004
In September and November 2005, Jean-Louis Charton found a(60)=54517 and a(47)=58543, respectively. Earlier, Mike Oakes found a(106)=7639 and a(124)=5839. All these large values of a(n) yield probable primes. - T. D. Noe, Dec 05 2005, Sep 18 2008
a(106) = 6529 and a(124) = 5167 are true.
a(137) is probably 196873 from prime of this form discovered by Jean-Louis Charton in December 2009 and reported to Henri Lifchitz's PRP Top. - Robert Price, Feb 17 2012
a(138) through a(150) is 2,>32401,2,2,3,8839,5,7,2,3,5,271,13. - Robert Price, Feb 17 2012
a(276)=88301, a(139)>240000 and a(256)>100000. - Jean-Louis Charton, Jun 27 2012
Three more terms found, a(325)=81943, a(392)=64747, a(412)=56963 and also a(139)>260000, a(295)>100000, a(370)>100000, a(373)>100000. 29 unknown terms < 1000 remain. - Jean-Louis Charton, Aug 15 2012
Three more terms a(577)=55117, a(588)=60089 and a(756)=96487. - Jean-Louis Charton, Dec 13 2012
Three more (PRP) terms a(845)=83761, a(897)=48311, a(918)=54919. - Jean-Louis Charton, Dec 31 2013.
Some of the results were computed using the PrimeFormGW (PFGW) primality-testing program. - Hugo Pfoertner, Nov 14 2019

Crossrefs

Programs

  • Mathematica
    lmt = 10000; f[n_] := Block[{p = 2}, While[p < lmt && !PrimeQ[(n+1)^p - n^p], p = NextPrime@ p]; If[p > lmt, 0, p]]; Do[ Print[{n, f[n] // Timing}], {n, 1000}] (* Robert G. Wilson v, Dec 01 2014 *)
    spp[n_]:=Module[{p=2},While[!PrimeQ[(n+1)^p-n^p],p=NextPrime[p]];p]; Array[spp,90] (* Harvey P. Dale, Jul 01 2025 *)
  • PARI
    a(n)=forprime(p=2,default(primelimit),if(ispseudoprime((n+1)^p-n^p),return(p))) \\ Charles R Greathouse IV, Feb 20 2012

Formula

a((p-1)/2) = 2 for odd primes p. - Alexander Adamchuk, Dec 01 2006

Extensions

More terms from T. D. Noe, Dec 05 2005
Typo in first Mathematica program corrected by Ray Chandler, Feb 22 2017

A222119 Number k yielding the smallest prime of the form (k+1)^p - k^p, where p = prime(n).

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 1, 5, 2, 1, 39, 6, 4, 12, 2, 2, 1, 6, 17, 46, 7, 5, 1, 25, 2, 41, 1, 12, 7, 1, 7, 327, 7, 8, 44, 26, 12, 75, 14, 51, 110, 4, 14, 49, 286, 15, 4, 39, 22, 109, 367, 22, 67, 27, 95, 80, 149, 2, 142, 3, 11, 402, 3, 44, 10, 82, 20, 95, 4, 108, 349, 127, 303, 37, 3, 162
Offset: 1

Views

Author

Vladimir Pletser, Feb 07 2013

Keywords

Comments

The smallest k generating a prime of the form (k+1)^p - k^p (A121620) for the prime A000040(n). For the primes p = 2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, ... (A000043), k = 1 and Mersenne primes 2^p - 1 (A000668) are obtained. For p = 11, 23, 29, ..., the smallest primes of the form (k+1)^p - k^p are respectively 313968931 (for k = 5), 777809294098524691 (for k = 5 also), 68629840493971 (for k = 2), ..., so a(5) = 5, a(9) = 5, a(10) = 2, ...

Crossrefs

Cf. A103794, A222120 (number of digits in the primes).

Programs

  • Maple
    A222119 := proc(n)
            p := ithprime(n) ;
            for k from 1 do
                    if isprime((k+1)^p-k^p) then
                            return k;
                    end if;
            end do:
    end proc: # R. J. Mathar, Feb 10 2013
  • Mathematica
    Table[p = Prime[n]; k = 1; While[q = (k + 1)^p - k^p; ! PrimeQ[q], k++]; k, {n, 80}] (* T. D. Noe, Feb 12 2013 *)
  • PARI
    f(p) = {my(k=1); while(ispseudoprime((k+1)^p-k^p)==0, k++); k; }
    lista(nn) = forprime(p=2, nn, print1(f(p), ", ")); \\ Jinyuan Wang, Feb 03 2020

Formula

a(n) = A103794(n) - 1. - Ray Chandler, Feb 26 2017

Extensions

More terms from Ray Chandler, Feb 27 2017

A250201 Least b such that Phi_n(b, b-1) is prime.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 2, 2, 2, 3, 2, 3, 4, 2, 6, 2, 4, 2, 2, 3, 3, 2, 2, 2, 2, 2, 4, 5, 40, 2, 3, 2, 7, 2, 5, 3, 3, 2, 13, 3, 2, 14, 4, 22, 3, 3, 13, 2, 34, 5, 3, 5, 2, 2, 34, 9, 2, 17, 7, 3, 2, 3, 18, 9, 47, 4, 20, 3, 2, 2, 8, 2, 4, 17, 6, 14, 2, 2, 61, 18, 2, 2
Offset: 2

Views

Author

Eric Chen, Mar 09 2015

Keywords

Comments

Phi_n(b, b-1) = (b-1)^EulerPhi(n) * Phi_n(b/(b-1)).
This sequence is not defined at n = 1 since Phi_1(b, b-1) = 1 for all b, and 1 is not prime. Conjecture: a(n) is defined for all n>1.
If b = 1, then Phi_n(b, b-1) = 1 for all n, and 1 is not prime, so all a(n) > 1.
a(n) = 2 if and only if n is in A072226.
n Phi_n(a, b)
1 a-b
2 a+b
3 a^2+ab+b^2
4 a^2+b^2
5 a^4+a^3*b+a^2*b^2+a*b^3+b^4
6 a^2-ab+b^2
... ...
n b^EulerPhi(n)*Phi_n(a/b)

Examples

			a(11) = 6 because Phi_11(b, b-1) is composite for b = 2, 3, 4, 5 and prime for b = 6.
a(37) = 40 because Phi_37(b, b-1) is composite for b = 2, 3, 4, ..., 39 and prime for b = 40.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 2; While[!PrimeQ[(k-1)^EulerPhi(n)*Cyclotomic[n, k/(k-1)]], k++]; k, {n, 2, 300}]
  • PARI
    a(n) = for(k = 2, 2^16, if(ispseudoprime((k-1)^eulerphi(n) * polcyclo(n, k/(k-1))), return(k)))

A301510 Smallest positive number b such that ((b+1)^prime(n) + b^prime(n))/(2*b + 1) is prime, or 0 if no such b exists.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 16, 1, 11, 6, 37, 1, 9, 120, 9, 1, 2, 67, 16, 1, 26, 103, 12, 60, 1, 239, 4, 40, 2, 44, 174, 33, 1, 3, 260, 114, 1, 161, 70, 1, 3, 2, 3, 50, 45, 472, 228, 183, 66, 37, 7, 122, 235, 68, 102, 294, 8, 13, 1, 40, 62, 143, 1, 61, 7
Offset: 2

Views

Author

Tim Johannes Ohrtmann, Mar 22 2018

Keywords

Comments

Conjecture: a(n) > 0 for every n > 1.
Records: 1, 4, 16, 37, 120, 239, 260, 472, 917, 1539, 6633, 7050, 12818, ..., which occur at n = 2, 10, 13, 17, 20, 32, 41, 52, 72, 128, 171, 290, 309, ... - Robert G. Wilson v, Jun 16 2018

Examples

			a(10) = 4 because (5^29 + 4^29)/9 = 2149818248341 is prime and (2^29 + 1^29)/3, (3^29 + 2^29)/5 and (4^29 + 3^29)/7 are all composite.
		

Crossrefs

Numbers n such that ((b+1)^n + b^n)/(2*b + 1) is prime for b = 1 to 18: A000978, A057469, A128066, A128335, A128336, A187805, A181141, A187819, A217095, A185239, A213216, A225097, A224984, A221637, A227170, A228573, A227171, A225818.

Programs

  • Mathematica
    Table[p = Prime[n]; k = 1; While[q = ((b+1)^n+b^n)/(2*b+1); ! PrimeQ[q], k++]; k, {n, 200}]
    f[n_] := Block[{b = 1, p = Prime@ n}, While[! PrimeQ[((b +1)^p + b^p)/(2b +1)], b++]; b]; Array[f, 70, 2] (* Robert G. Wilson v, Jun 13 2018 *)
  • PARI
    for(n=2, 200, b=0; until(isprime((((b+1)^prime(n)+b^prime(n))/(2*b+1))), b++); print1(b,", ")) \\ corrected by Eric Chen, Jun 06 2018

Formula

a(n) = A250201(2*prime(n)) - 1 for n >= 2. - Eric Chen, Jun 06 2018
Showing 1-4 of 4 results.