OFFSET
0,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
FORMULA
EXAMPLE
a(0) = 1, because 2/1 = 2 = prime(1), and no lesser number satisfies this.
a(1) = 3, because (3+5+7)/3 = 5 = prime(3), and no lesser number satisfies this.
MATHEMATICA
a[n_] := Module[{ps = Prime[Range[2*n+1]], k = n+1}, While[Total[ps] != (2*n+1)* ps[[n+1]], ps = Join[Rest[ps], {NextPrime[ps[[-1]]]}]; k++]; k]; Array[a, 55, 0] (* Amiram Eldar, Sep 07 2024 *)
PROG
(PARI) a(n) = my(k=n+1); while(sum(i=k-n, k+n, prime(i)) != (2*n+1)*prime(k), k++); k; \\ Michel Marcus, Jul 12 2023
CROSSREFS
KEYWORD
sign
AUTHOR
Jean-Marc Rebert, Jul 12 2023
STATUS
approved