login
A096699
Balanced primes of order seven.
17
29, 977, 1381, 1439, 3109, 3539, 4357, 4397, 5563, 7159, 8273, 8737, 10711, 11117, 13109, 13841, 15101, 18731, 18839, 20543, 21391, 21851, 23459, 24877, 27653, 28477, 28697, 30677, 32029, 32971, 34631, 35863, 36979, 37019, 37529, 38189
OFFSET
1,1
LINKS
EXAMPLE
29 is a member because 29 = (5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59)/15.
MATHEMATICA
Transpose[ Select[ Partition[ Prime[ Range[5000]], 15, 1], #[[8]] == (#[[1]] + #[[2]] + #[[3]] + #[[4]] + #[[5]] + #[[6]] + #[[7]] + #[[9]] + #[[10]] + #[[11]] + #[[12]] + #[[13]] + #[[14]] + #[[15]])/14 &]][[8]]
(* Second program: *)
With[{k = 7}, Select[MapIndexed[{Prime[First@ #2 + k], #1} &, Mean /@ Partition[Prime@ Range[5000], 2 k + 1, 1]], SameQ @@ # &][[All, 1]]] (* Michael De Vlieger, Feb 15 2018 *)
PROG
(GAP) P:=Filtered([1..70000], IsPrime);;
a:=List(Filtered(List([0..5000], k->List([8..22], j->P[j-7+k])), i->
Sum(i)/15=i[8]), m->m[8]); # Muniru A Asiru, Feb 14 2018
(PARI) isok(p) = {if (isprime(p), k = primepi(p); if (k > 7, sum(i=k-7, k+7, prime(i)) == 15*p; ); ); } \\ Michel Marcus, Mar 07 2018
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jun 26 2004
STATUS
approved