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.

A222120 Number of digits in the smallest prime of the form (k+1)^p - k^p, where p = prime(n).

Original entry on oeis.org

1, 1, 2, 3, 9, 4, 6, 6, 18, 14, 10, 60, 35, 31, 53, 26, 29, 19, 57, 90, 122, 72, 65, 27, 138, 49, 168, 33, 122, 103, 39, 119, 345, 126, 143, 250, 225, 182, 315, 204, 308, 371, 134, 227, 335, 489, 255, 156, 364, 312, 476, 613, 329, 460, 372, 522, 514, 590, 133
Offset: 1

Views

Author

Vladimir Pletser, Feb 07 2013

Keywords

Comments

The smallest primes of the form (k+1)^p - k^p are in A121620. The values of k are in A222119. 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.

Examples

			a(5) = 9 because the 5th prime is 11, and the smallest prime of the form (k+1)^11 - k^11 is 6^11 - 5^11 = 313968931, which has 9 digits
		

Crossrefs

Cf. A222119 (values of k).

Programs

  • Mathematica
    Table[p = Prime[n]; k = 1; While[q = (k + 1)^p - k^p; ! PrimeQ[q], k++]; Length[IntegerDigits[q]], {n, 60}] (* T. D. Noe, Feb 12 2013 *)
  • PARI
    a222120(n) = {local(p,k); p=prime(n); while(!isprime((k+1)^p - k^p), k=k+1); ceil(log((k+1)^p - k^p)/log(10))} \\ Michael B. Porter, Feb 12 2013