login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A126234 a(0)=0; a(n)=a(n-1)-n, if a(n-1)>2n; otherwise a(n)=a(n-1)+n. 1
0, 1, 3, 6, 10, 15, 9, 16, 24, 15, 25, 14, 26, 39, 25, 40, 24, 41, 23, 42, 22, 43, 65, 42, 66, 41, 67, 40, 68, 39, 69, 38, 70, 37, 71, 36, 72, 109, 71, 110, 70, 111, 69, 112, 68, 113, 67, 114, 66, 115, 65, 116, 64, 117, 63, 118, 62, 119, 61, 120, 180, 119, 181, 118, 182, 117 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Robert Israel, Table of n, a(n) for n = 0..10000

MAPLE

A[0]:= 0:

for n from 1 to 100 do

  if A[n-1]>2*n then A[n]:= A[n-1]-n else A[n]:= A[n-1]+n fi

od:

seq(A[i], i=0..100); # Robert Israel, Nov 16 2016

MATHEMATICA

s={0}; a=0; Do[a=a+If[a>2n, -n, n]; AppendTo[s, a], {n, 200}]; s

CROSSREFS

Sequence in context: A194037 A194101 A105333 * A259604 A130484 A074374

Adjacent sequences:  A126231 A126232 A126233 * A126235 A126236 A126237

KEYWORD

nonn,look

AUTHOR

Zak Seidov, Mar 08 2007

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 October 14 09:25 EDT 2019. Contains 327995 sequences. (Running on oeis4.)