login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A231153 Greatest integer k such that prime(n+1) + ... + prime(n+k) <= prime(1) + ... + prime(n). 3
1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25, 25, 26 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,5

COMMENTS

a(n) is the greatest k such that 2*s(n) >= s(n+k), where s(n) is the n-th partial sum of primes.

LINKS

Table of n, a(n) for n=2..72.

FORMULA

a(n) = A231152(n) - 1.

EXAMPLE

5 <= 2 + 3 < 5 + 7, so a(2) = 1.

19 + 23 <= 2 + 3 + 5 + 7 + 11 + 13 + 17 < 19 + 23 + 29, so a(7) = 2.

MATHEMATICA

test = 0; Table[test = test + Prime[n]; tmp = 0; NestWhile[# + 1 &, n, test >= (tmp = tmp + Prime[#]) &] - n, {n, 1, 80}]  (* Peter J. C. Moses, Nov 02 2013 *)

CROSSREFS

Cf. A007504, A231149, A231152.

Sequence in context: A113675 A020912 A194990 * A330557 A099199 A172474

Adjacent sequences:  A231150 A231151 A231152 * A231154 A231155 A231156

KEYWORD

nonn,easy

AUTHOR

Clark Kimberling, Nov 09 2013

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 10 05:05 EDT 2021. Contains 343748 sequences. (Running on oeis4.)