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

This page as a plain text file.
%I A222120 #10 Feb 12 2013 12:32:57
%S A222120 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,
%T A222120 49,168,33,122,103,39,119,345,126,143,250,225,182,315,204,308,371,134,
%U A222120 227,335,489,255,156,364,312,476,613,329,460,372,522,514,590,133
%N A222120 Number of digits in the smallest prime of the form (k+1)^p - k^p, where p = prime(n).
%C A222120 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.
%e A222120 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
%t A222120 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 *)
%o A222120 (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
%Y A222120 Cf. A222119 (values of k).
%K A222120 nonn,base
%O A222120 1,3
%A A222120 _Vladimir Pletser_, Feb 07 2013