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

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

Original entry on oeis.org

3, 3, 3, 3, 5, 3, 7, 7, 3, 3, 3, 17, 3, 3, 43, 5, 3, 1607, 5, 19, 127, 229, 3, 3, 3, 13, 3, 3, 149, 3, 5, 3, 23, 3, 5, 83, 3, 3, 37, 7, 3, 3, 37, 5, 3, 5, 58543, 3, 3, 7, 29, 3, 479, 5, 3, 19, 5, 3, 4663, 54517, 17, 3, 3, 5, 7, 3, 3, 17, 11, 47, 61, 19, 23, 3, 5, 19, 7, 5, 7, 3, 3
Offset: 1

Views

Author

Alexander Adamchuk, Dec 01 2006, Feb 15 2007

Keywords

Comments

Corresponding smallest primes of the form (n+1)^p - n^p, where p = a(n) is an odd prime, are listed in A121091(n+1) = {7, 19, 37, 61, 4651, 127, 1273609, 2685817, 271, 331, 397, 6431804812640900941, 547, 631, ...}. a(n) = A058013(n) for n = {4, 7, 10, 12, 13, 16, 17, 19, 22, 24, 25, 27, 28, 31, ...} = A047845(n) = (n-1)/2, where n runs through odd nonprimes (A014076), for n>1. a(97) = 7. a(99)..a(112) = {5, 43, 5, 13, 7, 5, 3, 6529, 59, 3, 5, 5, 113, 5}. a(114) = 139. a(117)..a(129) = {7, 13, 3, 5, 5, 7, 3, 5167, 3, 41, 59, 3, 3}. a(131) = 101. a(n) is currently unknown for n = {113, 115, 116, 130, 132, ...}.
a(96) = 1307, a(98) = 709.
a(137) is probably 196873 from a 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) are 113, >32401, 3, 7, 3, 8839, 5, 7, 13, 3, 5, 271, 13. - Robert Price, Feb 17 2012
a(137) = 196873 confirmed by Fischer link; a(139) > 260000. - Ray Chandler, Feb 26 2017

Crossrefs

Cf. A058013 (smallest prime p such that (n+1)^p - n^p is prime).
Cf. A065913 (smallest prime of form (n+1)^k - n^k).
Cf. A121091 (smallest nexus prime of the form n^p - (n-1)^p, where p is odd prime).
Cf. A062585 (numbers n such that k^n - (k-1)^n is prime, where k is 19).

A065913 Smallest prime of form (n+1)^k-n^k.

Original entry on oeis.org

3, 5, 7, 61, 11, 13, 1273609, 17, 19, 331, 23, 6431804812640900941, 547, 29, 31, 371281, 919, 37, 723901, 41, 43
Offset: 1

Views

Author

Labos Elemer, Nov 28 2001

Keywords

Comments

Comments from Alexander Adamchuk, Dec 01 2006: (Start)
All odd primes appear in a(n) at least once. The first appearance of an odd prime p is at n = (p-1)/2.
a((p-1)/2) = p for an odd prime p.
a(22) = 23^229 - 22^229 is too large to include. It has 312 decimal digits.
a(23)-a(46) = {47, 1801, 1951, 53, 2269, 2437, 59, 61, 4925281, 3169, 67, 3571, 71, 73, 4219, 4447, 79, 30914273881, 83, 5419, 3679488080703419029992001830200360494989758810080014618823621, 89, 6211, 23382031}.
a(47) = 48^58543 - 47^58543 is too large to include. It has 98425 decimal digits.
a(48)-a(58) = {97, 7351, 101, 103, 8269, 107, 109, 9241, 113, 54664711, 10267}.
a(59) = 60^4663 - 59^4663. It has 8292 decimal digits.
a(60) = 61^54517 - 60^54517. It has 97331 decimal digits.
a(61)-a(81) = {713835580568173731369609539971, 11719, 127, 86548801, 131, 13267, 13669, 137, 139, 496940436849933148484939822444032113390611498072883923298539774627631945868169334995191, 113800495603976028899998661913482644451644387715995710215436605525039737336830571095980506932977448410777858266201, 58329802318048613482563140972219929, 2639948386755753473388124912433009743732807, 149, 151, 153322207649456947462552507840652437, 1517045588059, 157, 1767611013841, 19441, 163}.
a(82) = 83^331 - 82^331. It has 636 decimal digits.
a(83) = 167.
a(84) = 85^179 - 84^179. It has 346 decimal digits.
a(85)-a(105) = 267217051, 173, 293109961, 23497, 179, 181, 25117, 488904527834196204158742748944541, 26227, 2081544344660333015884252162151127102699920950101669675583052736376217501372173959207735927588562334550194111760450436831, 191, 193, 6014268846559, 197, 199, 53397779357967755570376892781394768316196882820228621180807406343608647492333350034301, 530707531, 17492708299776808914354631, 8605791381097, 596286601, 211. (End)

Crossrefs

Formula

a(n) = (n+1)^A058013(n)-n^A058013(n)

A103794 Smallest number b such that b^prime(n) - (b-1)^prime(n) is prime.

Original entry on oeis.org

2, 2, 2, 2, 6, 2, 2, 2, 6, 3, 2, 40, 7, 5, 13, 3, 3, 2, 7, 18, 47, 8, 6, 2, 26, 3, 42, 2, 13, 8, 2, 8, 328, 8, 9, 45, 27, 13, 76, 15, 52, 111, 5, 15, 50, 287, 16, 5, 40, 23, 110, 368, 23, 68, 28, 96, 81, 150, 3, 143, 4, 12, 403, 4, 45, 11, 83, 21, 96, 5, 109, 350, 128, 304, 38, 4, 163
Offset: 1

Views

Author

Lei Zhou, Feb 24 2005

Keywords

Comments

Conjecture: sequence is defined for all positive indices.
For p=prime(n), Eisenstein's irreducibility criterion can be used to show that the polynomial (x+1)^p-x^p is irreducible, which is a necessary (but not sufficient) condition for a(n) to exist. - T. D. Noe, Dec 05 2005

Examples

			2^prime(1)-1^prime(1)=3 is prime, so a(1)=2;
2^prime(5)-1^prime(5)=2047 has a factor of 23;
...
6^prime(5)-5^prime(5)=313968931 is prime, so a(5)=6;
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,b;
      p:= ithprime(n);
      for b from 2 do
        if isprime(b^p - (b-1)^p) then return b fi
      od
    end proc:
    map(f, [$1..80]); # Robert Israel, Jun 04 2024
  • Mathematica
    Do[p=Prime[k]; n=2; nm1=n-1; cp=n^p-nm1^p; While[ !PrimeQ[cp], n=n+1; nm1=n-1; cp=n^p-nm1^p]; Print[n], {k, 1, 200}]

Formula

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

A121091 Smallest nexus prime of the form n^p - (n-1)^p, where p is an odd prime.

Original entry on oeis.org

7, 19, 37, 61, 4651, 127, 1273609, 2685817, 271, 331, 397, 6431804812640900941, 547, 631, 5613125740675652943160572913465695837595324940170321, 371281, 919
Offset: 2

Views

Author

Alexander Adamchuk, Aug 11 2006, revised Dec 01 2006, Feb 15 2007

Keywords

Comments

a(19) = 19^1607 - 18^1607, which is too large to include. It has 2055 decimal digits. See A062585(1) = 1607.
a(20)-a(21) = {723901, 8005616640331026125580781}. a(n) is currently known for all n up to n = 96. Corresponding smallest odd primes p such that (n+1)^p - n^p is prime are listed in A125713(n) = {3,3,3,3,5,3,7,7,3,3,3,17,3,3,43,5,3,10957,5,19,127,229,3,3,3,13,3,3,149,3,5,3,23,3,5,83,3,3,37,7,3,3,37,5,3,5,58543,...}. a(n+1) = A065013(n) for n = {4, 7, 10, 12, 13, 16, 17, 19, 22, 24, 25, 27, 28, 31, ...} = A047845(n) = (n-1)/2, where n runs through odd nonprimes (A014076), for n>1.

Crossrefs

Cf. A125713 = Smallest odd prime p such that (n+1)^p - n^p is prime. Cf. A065913 = Smallest prime of form (n+1)^k - n^k. Cf. A058013 = Smallest prime p such that (n+1)^p - n^p is prime. Cf. A047845, A014076.
Cf. A062585 = numbers n such that k^n - (k-1)^n is prime, where k is 19. Cf. A000043, A057468, A059801, A059802, A062572-A062666.

Formula

a(n) = n^A125713(n) - (n-1)^A125713(n).

A247244 Smallest prime p such that (n^p + (n+1)^p)/(2n+1) is prime, or -1 if no such p exists.

Original entry on oeis.org

3, 3, 3, 5, 3, 3, 7, 3, 7, 53, 47, 3, 7, 3, 3, 41, 3, 5, 11, 3, 3, 11, 11, 3, 5, 103, 3, 37, 17, 7, 13, 37, 3, 269, 17, 5, 17, 3, 5, 139, 3, 11, 78697, 5, 17, 3671, 13, 491, 5, 3, 31, 43, 7, 3, 7, 2633, 3, 7, 3, 5, 349, 3, 41, 31, 5, 3, 7, 127, 3, 19, 3, 11, 19, 101, 3, 5, 3, 3
Offset: 1

Views

Author

Eric Chen, Nov 28 2014

Keywords

Comments

All terms are odd primes.
a(79) > 10000, if it exists.
a(80)..a(93) = {3, 7, 13, 7, 19, 31, 13, 163, 797, 3, 3, 11, 13, 5}, a(95)..a(112) = {5, 2657, 19, 787, 3, 17, 3, 7, 11, 1009, 3, 61, 53, 2371, 5, 3, 3, 11}, a(114)..a(126) = {103, 461, 7, 3, 13, 3, 7, 5, 31, 41, 23, 41, 587}, a(128)..a(132) = {7, 13, 37, 3, 23}, a(n) is currently unknown for n = {79, 94, 113, 127, 133, ...} (see the status file under Links).

Examples

			a(10) = 53 because (10^p + 11^p)/21 is composite for all p < 53 and prime for p = 53.
		

Crossrefs

Programs

  • Mathematica
    lmt = 4200; f[n_] := Block[{p = 2}, While[p < lmt && !PrimeQ[((n + 1)^p + n^p)/(2n + 1)], p = NextPrime@ p]; If[p > lmt, 0, p]]; Do[Print[{n, f[n] // Timing}], {n, 1000}] (* Robert G. Wilson v, Dec 01 2014 *)
  • PARI
    a(n)=forprime(p=3, , if(ispseudoprime((n^p+(n+1)^p)/(2*n+1)), return(p)))

Formula

a(n) = 3 if and only if n^2 + n + 1 is a prime (A002384).

Extensions

a(43) from Aurelien Gibier, Nov 27 2023

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)))

A115596 The least number k > 1 such that (p+1)^k - p^k is prime, p = n-th prime.

Original entry on oeis.org

2, 2, 2, 7, 2, 3, 3, 5, 2, 2, 5, 3, 2, 37, 58543, 2, 4663, 17, 3, 61, 23, 7, 2, 2, 7, 5, 7, 59, 5, 2, 59, 2, 196873
Offset: 1

Views

Author

Zak Seidov, Jan 25 2006

Keywords

Comments

Values k=1 is omitted as in this case p is Sophie Germain prime (2p+1 is also prime) A005384.
Each term is necessarily prime. Sophie Germain primes correspond to case k = 2. - Giuseppe Coppoletta, Oct 10 2018

Examples

			a(1)=2 because (2+1)^2-2^2 = 5 is prime;
a(14)=37 because p(14)=43 and (43+1)^37-43^37 = 3679488080703419029992001830200360494989758810080014618823621 is prime.
		

Crossrefs

Programs

  • Mathematica
    s={}; Do[n=Prime[i];k=2; While[!PrimeQ[(n+1)^k-n^k],k++]; AppendTo[s, k],  {i, 14}]; s (* Amiram Eldar, Oct 12 2018 *)
  • PARI
    a(n)=my(p=prime(n),k=1); while(!ispseudoprime((p+1)^k++-p^k),); k \\ Charles R Greathouse IV, Oct 08 2013

Extensions

Edited by Giuseppe Coppoletta, Oct 10 2018
a(15)-a(33) from Vaclav Kotesovec, Oct 11 2018

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