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

A240173 Numbers n such that k^n - 2^k is not prime for any k.

Original entry on oeis.org

1, 2, 13, 43, 45, 51, 53, 55, 57, 63, 72, 77, 81, 84, 85, 89, 93, 103, 108, 117, 121, 129, 147, 149, 151, 163, 171, 173, 177, 183, 191, 213, 229, 231, 239, 241, 250, 259, 261, 263, 273, 283, 286, 291, 321, 331, 333, 344, 345, 351, 353, 361, 373, 381, 390, 399
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 02 2014

Keywords

Comments

Numbers n such that A245459(n) = 0.

Crossrefs

Cf. A245459.

Programs

  • Python
    import sympy
    def a(n):
      k = 2
      count = 0
      while k**n > 2**k:
        if sympy.isprime(k**n-2**k):
          count += 1
        k += 1
      return count
    n = 1
    while n < 1000:
      if not a(n):
        print(n, end=', ')
      n += 1 # Derek Orr, Aug 02 2014

Formula

A245459(a(n)) = 0.

Extensions

a(13)-a(34) from Derek Orr, Aug 02 2014
a(35) onwards from Amiram Eldar, Oct 03 2024

A242113 a(n) = number of primes of the form k^n - m^k where k > m > 0.

Original entry on oeis.org

0, 1, 2, 6, 7, 2, 14, 7, 11, 10, 33, 10, 42, 35, 47, 39, 122, 22, 248, 113, 247, 236, 751, 75, 1268, 812, 1422, 1531, 4543, 87, 8669, 5750, 8884, 10983, 29084, 2274, 58841, 41242, 58030, 74646, 216647, 11656, 419147, 313237, 364925, 617742, 1576642, 75542, 3071839, 2299620
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 15 2014

Keywords

Comments

It would be good to have a proof that a(n) is always finite. - N. J. A. Sloane, Sep 06 2014

Examples

			a(2) = 1 because  2^2 - 1^2 = 3 is prime;
a(3) = 2 because  2^3 - 1^2 = 7 is prime and 3^3 - 2^3 = 19 is prime, but 2^3 - 2^3 < 0, 5^3 - 2^5 = 93 is not prime, 5^3 - 2^7 = 215 is not prime, 9^3 - 2^9 = 217 is not prime, 11^3 - 2^11 < 0.
More generally, primes of the form k^r - m^k where  k > m > 0:
r = 2: 3;
r = 3: 7, 19;
r = 4: 7, 17, 73, 593, 2273, 20369;
r = 5: 7, 23, 31, 179, 58537, 1951811, 1986949;
r = 6: 4818617, 24006497;
r = 7: 7, 47, 79, 103, 127, 1137, 2179, 77101, 162287, 543607, 1706527, 9940951, 6069961193, 25365130463;
r = 8: 31, 6553, 141793, 49046209, 815722529, 16983038753, 499709542049;
r = 9: 71, 151, 223, 431, 463, 487, 503, 4521799, 133227103, 10604491181, 1175888158183;
r = 10: 4177, 37097, 58049, 58537, 1803001, 2486784401, 3486783889, 41426502825041, 819626139497153, 52458394747474721.
		

Crossrefs

Programs

  • Mathematica
    f[r_] := Length@ Rest@ Union@ Flatten@ Table[ If[ PrimeQ[k^r - m^k], k^r - m^k, 0], {k, 2, 10000000}, {m, Floor[k^(r/k)]}]; Do[ Print[ f[r]], {r, 2, 50}] (* Robert G. Wilson v, Aug 25 2014 *)

Formula

a(n) >= A245459(n).

Extensions

a(10)-a(50) from Robert G. Wilson v, Aug 25 2014

A246060 Number of primes of the form k^(n - m) - m^k where n > 2 and positive k, m.

Original entry on oeis.org

1, 1, 1, 5, 4, 5, 4, 7, 2, 8, 3, 10, 1, 12, 7, 13, 1, 11, 6, 13, 6, 19, 3, 12, 4, 17, 4, 10, 2, 18, 4, 15, 3, 21, 6, 14, 8, 18, 9, 23, 7, 9, 7, 21, 5, 13, 6, 22, 8, 16, 8, 24, 5, 22, 9, 12, 6, 26, 9, 26, 11, 27, 5, 30, 14, 34, 9, 23, 9, 48, 7, 11, 14, 37, 8, 32
Offset: 3

Views

Author

Juri-Stepan Gerasimov, Aug 23 2014

Keywords

Examples

			a(3) = 1 because 2^(3 - 1) - 1^2 = 3 is prime with k = 2 and m = 1;
a(4) = 1 because 2^(4 - 1) - 1^2 = 7 is prime with k = 2 and m = 1;
a(5) = 1 because 3^(5 - 2) - 2^3 = 19 is prime with k = 3 and m = 2.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(k=2, q, v=List([])); if(ispseudoprime(q=2^(n-1)-1), listput(v, q)); while(k^(n-2)>2^k, if(ispseudoprime(q=k^(n-2)-2^k), listput(v, q)); k++); for(m=3, n-2, for(t=2, k-1, if(ispseudoprime(q=t^(n-m)-m^t), listput(v, q)))); #Set(v); } \\ Jinyuan Wang, Feb 24 2020

Extensions

Definition and a(7) corrected by Colin Barker, Sep 01 2014
More terms from Jinyuan Wang, Feb 24 2020
Showing 1-3 of 3 results.