OFFSET
1,1
COMMENTS
Union, for all k>0, of (2k+1)-balanced prime numbers, i.e., balanced prime of order k, which are primes p_n such that (2k+1)*p_n = Sum_{i=n-k..n+k} p_i, where p_i is the i-th prime.
LINKS
Donovan Johnson, Table of n, a(n) for n = 1..10000
EXAMPLE
17 is in the sequence because 17 = (7 + 11 + 13 + 17 + 19 + 23 + 29)/7, (k = 3).
29 is in the sequence because 29 = (5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59)/15, (k = 7).
37 is a member because 37 = (7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59 + 61 + 67 + 71)/17; 7 & 71 are eight primes away from 37.
MATHEMATICA
t[n_] := (For[k=1, !(SameQ[1/(2k+1)Sum[Prime[i], {i, n-k, n+k}], Prime[n]])&& k < n-1, k++ ]; k); b[n_] := If[t[n]<n-1||SameQ[1/(2n-1)Sum[Prime[i], {i, 2n-1}], Prime[n]], t[n], 0]; v={}; Do[If[b[n]!=0, v=Append[v, Prime[n]]], {n, 2, 168}]; v
PROG
(PARI) is_A090403(p)={my(s=0, n); isprime(p) & for(k=1, -1+n=primepi(p), (s+=prime(n+k)+prime(n-k)-2*p)||return(1); s>p & return)} \\ M. F. Hasler, Oct 21 2012
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Farideh Firoozbakht, Dec 07 2003
EXTENSIONS
Definition corrected by Franklin T. Adams-Watters, Apr 13 2006
Edited by M. F. Hasler, Oct 21 2012
STATUS
approved