login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A096693 Balance index of each prime. 21
0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 4, 0, 0, 5, 1, 0, 0, 1, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 1, 0, 1, 0, 1, 0, 2, 0, 2, 1, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,16
COMMENTS
a(n) = the number of values of k for which the n-th prime is equal to the arithmetic average of the k primes above and below it.
The average of the first n balance indexes appears to reach a global maximum of 0.588 when n = 85, (prime(85) = 439).
LINKS
EXAMPLE
a(3) = 1 because the third prime, 5, equals (3 + 7)/2.
a(16) = 3 because the sixteenth prime, 53, equals (47 + 59)/2 = (41 + 43 + 47 + 59 + 61 + 67)/6 = (31 + 37 + 41 + 43 + 47 + 59 + 61 + 67 + 71 + 73)/10.
MATHEMATICA
f[n_] := Block[{c = 0, k = 1, p = Prime[n], s = Plus @@ Table[ Prime[i], {i, n - 1, n + 1}]}, While[k != n - 1, If[s == (2k + 1)p, c++ ]; k++; s = s + Prime[n - k] + Prime[n + k]]; c]; Table[ f[n], {n, 105}]
PROG
(PARI) b-file generator: {max_n = 10^4; for (n = 1, max_n, c = 0; k = 1; p = prime(n); s = p; while (k < n, s = s + prime(n - k) + prime(n + k); if (s == (2 * k + 1) * p, c++); k++; ); print(n " " c); ) ; }
CROSSREFS
Sequence in context: A085393 A128980 A143276 * A193139 A083206 A069531
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jun 26 2004
EXTENSIONS
Corrected and edited by Christopher Hunt Gribble, Apr 06 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 26 10:59 EDT 2024. Contains 371997 sequences. (Running on oeis4.)