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.

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

A247093 Triangle read by rows: T(m,n) = smallest odd prime p such that (m^p-n^p)/(m-n) is prime (0

Original entry on oeis.org

3, 3, 3, 0, 0, 3, 3, 5, 13, 3, 3, 0, 0, 0, 5, 5, 3, 3, 5, 3, 3, 3, 0, 3, 0, 19, 0, 7, 0, 3, 0, 0, 3, 0, 3, 7, 19, 0, 3, 0, 0, 0, 31, 0, 3, 17, 5, 3, 3, 5, 3, 5, 7, 5, 3, 3, 0, 0, 0, 3, 0, 3, 0, 0, 0, 3, 5, 3, 7, 5, 5, 3, 7, 3, 3, 251, 3, 17, 3, 0, 5, 0, 151, 0, 0, 0, 59, 0, 5, 0, 3, 3, 5, 0, 1097, 0, 0, 3, 3, 0, 0, 7, 0, 17, 3
Offset: 1

Views

Author

Eric Chen, Nov 18 2014

Keywords

Comments

T(m,n) is 0 if and only if m and n are not coprime or A052409(m) and A052409(n) are not coprime. (The latter has some exceptions, like T(8,1) = 3. In fact, if p is a prime and does not equal to A052410(gcd(A052409(m),A052409(n))), then (m^p-n^p)/(m-n) is composite, so if it is not 0, then it is A052410(gcd(A052409(m),A052409(n))).) - Eric Chen, Nov 26 2014
a(i) = T(m,n) corresponds only to probable primes for (m,n) = {(15,4), (18,1), (19,18), (31,6), (37,22), (37,25), ...} (i={95, 137, 171, 441, 652, 655, ...}). With the exception of these six (m,n), all corresponding primes up to a(663) are definite primes. - Eric Chen, Nov 26 2014
a(n) is currently known up to n = 663, a(664) = T(37, 34) > 10000. - Eric Chen, Jun 01 2015
For n up to 1000, a(n) is currently unknown only for n = 664, 760, and 868. - Eric Chen, Jun 01 2015

Examples

			Read by rows:
m\n        1   2   3   4   5   6   7   8   9   10  11
2          3
3          3   3
4          0   0   3
5          3   5   13  3
6          3   0   0   0   5
7          5   3   3   5   3   3
8          3   0   3   0   19  0   7
9          0   3   0   0   3   0   3   7
10         19  0   3   0   0   0   31  0   3
11         17  5   3   3   5   3   5   7   5   3
12         3   0   0   0   3   0   3   0   0   0   3
etc.
		

Crossrefs

Cf. A128164 (n,1), A125713 (n+1,n), A125954 (2n+1,2), A122478 (2n+1,2n-1).
Cf. A000043 (2,1), A028491 (3,1), A057468 (3,2), A059801 (4,3), A004061 (5,1), A082182 (5,2), A121877 (5,3), A059802 (5,4), A004062 (6,1), A062572 (6,5), A004063 (7,1), A215487 (7,2), A128024 (7,3), A213073 (7,4), A128344 (7,5), A062573 (7,6), A128025 (8,3), A128345 (8,5), A062574 (8,7), A173718 (9,2), A128346 (9,5), A059803 (9,8), A004023 (10,1), A128026 (10,3), A062576 (10,9), A005808 (11,1), A210506 (11,2), A128027 (11,3), A216181 (11,4), A128347 (11,5), A062577 (11,10), A004064 (12,1), A128348 (12,5), A062578 (12,11).

Programs

  • Mathematica
    t1[n_] := Floor[3/2 + Sqrt[2*n]]
    m[n_] := Floor[(-1 + Sqrt[8*n-7])/2]
    t2[n_] := n-m[n]*(m[n]+1)/2
    b[n_] := GCD @@ Last /@ FactorInteger[n]
    is[m_, n_] := GCD[m, n] == 1 && GCD[b[m], b[n]] == 1
    Do[k=2, If[is[t1[n], t2[n]], While[ !PrimeQ[t1[n]^Prime[k] - t2[n]^Prime[k]], k++]; Print[Prime[k]], Print[0]], {n, 1, 663}] (* Eric Chen, Jun 01 2015 *)
  • PARI
    a052409(n) = my(k=ispower(n)); if(k, k, n>1);
    a(m, n) = {if (gcd(m,n) != 1, return (0)); if (gcd(a052409(m), a052409(n)) != 1, return (0)); forprime(p=3,, if (isprime((m^p-n^p)/(m-n)), return (p)););}
    tabl(nn) = {for (m=2, nn, for(n=1, m-1, print1(a(m,n), ", ");); print(););} \\ Michel Marcus, Nov 19 2014
    
  • PARI
    t1(n)=floor(3/2+sqrt(2*n))
    t2(n)=n-binomial(floor(1/2+sqrt(2*n)), 2)
    b(n)=my(k=ispower(n)); if(k, k, n>1)
    a(n)=if(gcd(t1(n),t2(n)) !=1 || gcd(b(t1(n)), b(t2(n))) !=1, 0, forprime(p=3,2^24,if(ispseudoprime((t1(n)^p-t2(n)^p)/(t1(n)-t2(n))), return(p)))) \\ Eric Chen, Jun 01 2015

A124155 19^p - 18^p, where p = Prime[n].

Original entry on oeis.org

37, 1027, 586531, 281651707, 52221848818987, 21230018596585891, 3294475298046105653971, 1270184310304975912766347, 183481914331285799334907290427, 9601090905261258491400850200348915811
Offset: 1

Views

Author

Alexander Adamchuk, Dec 01 2006

Keywords

Comments

The first prime in a(n) is a(1) = 37 = 19^2 - 18^2. The second prime in a(n) is a(1331) = 19^10957 - 18^10957. It has 14012 decimal digits. Note that 1331 = 11^3, Prime[11^3] = 10957. Last digit of a(n) is 1 or 7. It appears that 3^2 divides a(n) - 1. Also it appears that 7^3 divides all a(n) - 1 for n>2. a(n) - 1 is divisible by 7^m, where m(n) = {0,0,3,7,3,6,3,6,3,3,6,6,3,...}. 7^6 divides a(n) - 1 for n = {4,6,8,11,12,14,18,19,21,22,25,27,29,31,34,36,37,38,42,44,46,47,48,50,53,58,59,61,63,65,67,68,70,73,74,75,78,80,82,84,85,88,90,93,95,99,100,...}. 7^7 divides a(n) - 1 for n = {4,14,31,47,68,75,82,90,101,115,122,134,153,163,169,177,183,213,226,233,251,269,295,...}. 7^8 divides a(n) - 1 for n = {153,233,383,493,531,669,775,839,871,907,937,...}.

Crossrefs

Cf. A121091 = Smallest nexus prime of the form n^p - (n-1)^p, where p is odd prime. Cf. A125713 = Smallest odd prime p such that (n+1)^p - n^p is prime.

Programs

  • Mathematica
    Table[19^Prime[n]-18^Prime[n],{n,1,15}]

Formula

a(n) = 19^Prime[n] - 18^Prime[n].
Showing 1-4 of 4 results.