login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A247244 Smallest prime p such that (n^p + (n+1)^p)/(2n+1) is prime, or -1 if no such p exists. 3

%I #120 Feb 06 2024 02:21:52

%S 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,

%T 7,13,37,3,269,17,5,17,3,5,139,3,11,78697,5,17,3671,13,491,5,3,31,43,

%U 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

%N Smallest prime p such that (n^p + (n+1)^p)/(2n+1) is prime, or -1 if no such p exists.

%C All terms are odd primes.

%C a(79) > 10000, if it exists.

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

%H Aurelien Gibier, <a href="/A247244/b247244.txt">Table of n, a(n) for n = 1..78</a> (first 42 terms from Robert G. Wilson v)

%H Robert G. Wilson v, <a href="/A247244/a247244_1.txt">Table of n, a(n) for n = 1..1000 with status of unknown terms</a> [updated/edited by Jon E. Schoenfield]

%F a(n) = 3 if and only if n^2 + n + 1 is a prime (A002384).

%e a(10) = 53 because (10^p + 11^p)/21 is composite for all p < 53 and prime for p = 53.

%t 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 *)

%o (PARI) a(n)=forprime(p=3, , if(ispseudoprime((n^p+(n+1)^p)/(2*n+1)), return(p)))

%Y Cf. A058013, A125713, A000978, A057469, A128066, A128335, A128336, A187805, A181141, A187819, A217095, A185239, A213216, A225097, A224984, A221637, A227170, A228573, A227171, A225818, A227172, A227173, A227174.

%K nonn

%O 1,1

%A _Eric Chen_, Nov 28 2014

%E a(43) from _Aurelien Gibier_, Nov 27 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 3 03:31 EDT 2024. Contains 372204 sequences. (Running on oeis4.)