OFFSET
1,2
COMMENTS
a(n) = 1 if and only if n + 2 is prime.
a(n) is never 2 or 3 because 1 + (n+1) + (n+2)^2 and 1 + (n+1) + (n+2)^2 + (n+3)^3 are divisible (as polynomials) by n+3, nor 5 or 6 because Sum_{0 <= j <= 5} (n+j)^j and Sum_{0 <= j <= 6} (n+j)^j are divisible by n+6.
If a(12) <> -1, then it is greater than 3000 and the corresponding prime has more than 10440 digits.
If a(16) <> -1, then it is greater than 20000. - Michael S. Branicky, Sep 30 2024
LINKS
Robert Israel, Table of n, a(n) for n = 1 .. 100. Entries of -1 indicate that there are no primes for k up to 3000.
EXAMPLE
a(2) = 12 because 2^0 + 3^1 + 4^2 + 5^3 + 6^4 + 7^5 + 8^6 + 9^7 + 10^8 + 11^9 + 12^10 + 13^11 + 14^12 = 58550453144609 which is prime, and none of the earlier sums are prime.
MAPLE
# This program produces a result of -1 if no primes are found before the sum grows
# to at least 10000 digits
g:= proc(n, k) local i;
add((n+i)^i, i=0..k)
end proc:
f:= proc(n) local k, v;
for k from 1 do
v:= g(n, k);
if length(v) > 10000 then return -1 fi;
if isprime(v) then return k fi
od;
-1
end proc:
map(f, [$1..20]);
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Robert Israel, Sep 26 2024
EXTENSIONS
a(12) from Michael S. Branicky, Sep 29 2024
STATUS
approved