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!)
A008345 a(n+1) = a(n)-b(n+1) if a(n) >= b(n+1) else a(n)+b(n+1), where {b(n)} are the triangular numbers A000217. 4
0, 1, 4, 10, 0, 15, 36, 8, 44, 89, 34, 100, 22, 113, 8, 128, 264, 111, 282, 92, 302, 71, 324, 48, 348, 23, 374, 752, 346, 781, 316, 812, 284, 845, 250, 880, 214, 917, 176, 956, 136, 997, 94, 1040, 50, 1085, 4, 1132, 2308, 1083, 2358, 1032, 2410, 979, 2464, 924 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
a(0) and a(4) are both zero. Are there any other zero values? - N. J. A. Sloane, Sep 12 2019
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..25000 (first 1001 terms from Franklin T. Adams-Watters)
MAPLE
A008345 := proc(n) option remember; if n = 1 then n-1 elif A008345(n-1) >= n*(n+1)/2 then A008345(n-1)-n*(n+1)/2 else A008345(n-1)+n*(n+1)/2; fi; end;
MATHEMATICA
nxt[{n_, a_}]:=Module[{tr=((n+1)(n+2))/2}, {n+1, If[a>=tr, a-tr, a+tr]}]; Transpose[NestList[nxt, {0, 0}, 50]][[2]] (* Harvey P. Dale, Jun 19 2013 *)
CROSSREFS
Sequence in context: A331450 A051499 A333654 * A279082 A016488 A087212
KEYWORD
nonn,easy
AUTHOR
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 23 11:04 EDT 2024. Contains 371905 sequences. (Running on oeis4.)