# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a222119 Showing 1-1 of 1 %I A222119 #22 Feb 17 2020 07:04:42 %S A222119 1,1,1,1,5,1,1,1,5,2,1,39,6,4,12,2,2,1,6,17,46,7,5,1,25,2,41,1,12,7,1, %T A222119 7,327,7,8,44,26,12,75,14,51,110,4,14,49,286,15,4,39,22,109,367,22,67, %U A222119 27,95,80,149,2,142,3,11,402,3,44,10,82,20,95,4,108,349,127,303,37,3,162 %N A222119 Number k yielding the smallest prime of the form (k+1)^p - k^p, where p = prime(n). %C A222119 The smallest k generating a prime of the form (k+1)^p - k^p (A121620) for the prime A000040(n). 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. For p = 11, 23, 29, ..., the smallest primes of the form (k+1)^p - k^p are respectively 313968931 (for k = 5), 777809294098524691 (for k = 5 also), 68629840493971 (for k = 2), ..., so a(5) = 5, a(9) = 5, a(10) = 2, ... %H A222119 Jinyuan Wang, Table of n, a(n) for n = 1..175 %F A222119 a(n) = A103794(n) - 1. - _Ray Chandler_, Feb 26 2017 %p A222119 A222119 := proc(n) %p A222119 p := ithprime(n) ; %p A222119 for k from 1 do %p A222119 if isprime((k+1)^p-k^p) then %p A222119 return k; %p A222119 end if; %p A222119 end do: %p A222119 end proc: # _R. J. Mathar_, Feb 10 2013 %t A222119 Table[p = Prime[n]; k = 1; While[q = (k + 1)^p - k^p; ! PrimeQ[q], k++]; k, {n, 80}] (* _T. D. Noe_, Feb 12 2013 *) %o A222119 (PARI) f(p) = {my(k=1); while(ispseudoprime((k+1)^p-k^p)==0, k++); k; } %o A222119 lista(nn) = forprime(p=2, nn, print1(f(p), ", ")); \\ _Jinyuan Wang_, Feb 03 2020 %Y A222119 Cf. A103794, A222120 (number of digits in the primes). %K A222119 nonn %O A222119 1,5 %A A222119 _Vladimir Pletser_, Feb 07 2013 %E A222119 More terms from _Ray Chandler_, Feb 27 2017 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE