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

 

Logo

Many excellent designs for a new banner were submitted. We will use the best of them in rotation.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A138376 a(n+1) = abs[ a(n) + Sum_of_digits_of(n+1)], with a(0)=0. 0
0, 1, 3, 0, 4, 1, 7, 0, 8, 1, 2, 0, 3, 1, 6, 0, 7, 1, 10, 0, 2, 1, 5, 0, 6, 1, 9, 0, 10, 1, 4, 0, 5, 1, 8, 0, 9, 1, 12, 0, 4, 1, 7, 0, 8, 1, 11, 0, 12, 1, 6, 0, 7, 1, 10, 0, 11, 1, 14, 0, 6, 1, 9, 0, 10, 1, 13, 0, 14, 1, 8, 0, 9, 1, 12, 0, 13, 1, 16, 0, 8, 1, 11, 0, 12, 1, 15, 0, 16, 1, 10, 0, 11, 1, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

a(4*k)=0, with k>=1

a(4*k-2)=1, with k>=1

LINKS

Table of n, a(n) for n=0..94.

FORMULA

a(n+1) = abs[ a(n) + Sum_of_digits_of(n+1)], with a(0)=0.

MAPLE

P:=proc(n) local a, i, k, w; a:=0; print(a); for i from 1 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; a:=abs(a+(-1)^i*w); print(a); od; end: P(100);

CROSSREFS

Cf. A037123.

Sequence in context: A127375 A238573 A195084 * A077140 A003815 A131486

Adjacent sequences:  A138373 A138374 A138375 * A138377 A138378 A138379

KEYWORD

easy,nonn,base

AUTHOR

Paolo P. Lava and Giorgio Balzarotti, May 08 2008

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified April 16 02:33 EDT 2014. Contains 240534 sequences.