login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A126906
Smallest k such that 1 + k^(2*n+1) + Sum_{j=1..n} k^(2*j) is prime.
1
1, 2, 1, 2, 1, 10, 17, 2, 1, 2, 1, 94, 122, 22, 1, 80, 1, 4, 6, 2, 1, 242, 3, 6, 5, 80, 1, 12, 1, 82, 96, 2, 7, 188, 1, 136, 69, 158, 1, 2, 1, 954, 50, 118, 1, 570, 14, 90, 45, 6, 1, 228, 38, 4, 6, 22, 1, 12, 1, 580, 86, 336, 24, 768, 1, 1170, 408, 340, 1, 896
OFFSET
1,2
COMMENTS
1 is a term if and only if number of terms in polynomial is prime.
LINKS
MATHEMATICA
a[n_]: = Module[{k = 1}, While[!PrimeQ[1 + k^(2*n+1) + Sum[k^(2*j), {j, 1, n}]], k++]; k]; Array[a, 30] (* Amiram Eldar, Mar 13 2020 *)
PROG
(PARI) a(n) = my(k = 1); while(! isprime(1 + k^(2*n+1) + sum(j=1, n, k^(2*j))), k++); k; \\ Michel Marcus, Mar 13 2020
KEYWORD
nonn
AUTHOR
Artur Jasinski, Dec 31 2006
EXTENSIONS
More terms from Amiram Eldar, Mar 13 2020
STATUS
approved