OFFSET
3,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 3..10000
EXAMPLE
a(5) = 12 because 12 = A000326(3) is a pentagonal number and is the average of consecutive primes 11 and 13, and neither of the previous pentagonal numbers (1 and 5) are averages of consecutive primes.
MAPLE
f:= proc(s) local n, x;
for n from 1 do
x:= ((s-2)*n^2 - (s-4)*n)/2;
if x >= 4 and not isprime(x) and prevprime(x) + nextprime(x) = 2*x then return x fi
od
end proc:
map(f, [$3..100]);
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Sep 29 2024
STATUS
approved