

A126659


Least number k > 0 such that ((2n1)^k + 1)/(2n) is prime, or 0 if no such prime exists.


17



3, 5, 3, 3, 5, 3, 3, 7, 17, 3, 11, 3, 0, 7, 109, 5, 11, 5, 3, 17, 5, 103, 5, 7, 3, 21943, 3, 53, 17, 7, 3, 19, 3, 11, 5, 7, 5, 37, 3, 3, 19, 167, 7, 13, 3, 89, 43
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,1


COMMENTS

All terms are odd primes.


LINKS

Eric Weisstein's World of Mathematics, Repunit.


FORMULA



MATHEMATICA

A126659[n_] := Module[{k = 1}, If[n == 14, Return[0]]; While[! PrimeQ[((2 n  1)^k + 1)/(2 n)], k++]; k]; Table[A126659[n], {n, 2, 48}] (* Robert Price, Oct 29 2018 *)


PROG

(PARI) a(n) = {if (n==14, return(0)); my(k=3); while (! isprime(((2*n1)^k + 1)/(2*n)), k = nextprime(k+1)); k; } \\ Michel Marcus, Nov 23 2018


CROSSREFS



KEYWORD

hard,more,nonn


AUTHOR



STATUS

approved



