login
A309222
a(0) = 6; thereafter a(n) = a(n-1) + prime(n) if prime(n) > a(n-1), otherwise a(n) = a(n-1) - prime(n).
3
6, 4, 1, 6, 13, 2, 15, 32, 13, 36, 7, 38, 1, 42, 85, 38, 91, 32, 93, 26, 97, 24, 103, 20, 109, 12, 113, 10, 117, 8, 121, 248, 117, 254, 115, 264, 113, 270, 107, 274, 101, 280, 99, 290, 97, 294, 95, 306, 83, 310, 81, 314, 75, 316, 65, 322, 59, 328, 57, 334, 53, 336, 43, 350, 39, 352
OFFSET
0,1
COMMENTS
Hugo van der Sanden asks if this ever reaches 0. He finds that a(n) > 0 for n < 5*10^10. Probabilistic arguments suggest it will never reach 0.
REFERENCES
Hugo van der Sanden, Posting to Sequence Fans Mailing List, Aug 28 2019
LINKS
CROSSREFS
If we start with 0 or 1 instead of 6 we get A008348, A022837.
Similar in spirit to A008344, and has a similar graph.
Sequence in context: A299998 A190405 A180659 * A324034 A365319 A343614
KEYWORD
nonn,look
AUTHOR
N. J. A. Sloane, Aug 29 2019
STATUS
approved