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!)
A309216 a(0)=0; thereafter a(n) = a(n-1)+n if the (n-1)st digit of the sequence is even, otherwise a(n) = a(n-1)-n. 4
0, 1, -1, -4, 0, 5, -1, -8, 0, 9, -1, -12, -24, -11, 3, 18, 2, -15, -33, -52, -32, -11, -33, -56, -80, -105, -131, -104, -132, -103, -133, -164, -196, -229, -263, -228, -192, -155, -193, -154, -194, -235, -277, -320, -364, -319, -273, -320, -368, -319, -369, -318, -370, -423, -477, -532 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
The absolute values of the digits are 0, 1, 1, 4, 0, 5, 1, 8, 0, 9, 1, 1, 2, 2, 4, 1, 1, 3, 1, 8, 2, 1, 5, 3, 3, 5, 2, ... (Of course the signs can be ignored when looking at the parity of the digits.)
LINKS
MAPLE
t:=0;
a:=[0]; b:=[]; M:=100;
for i from 1 to M do
v1:=convert(abs(t), base, 10); L:=nops(v1);
v2:=[seq(v1[L-i+1], i=1..L)];
b:=[op(b), op(v2)];
if (b[i] mod 2) = 0 then t:=t+i else t:=t-i; fi;
a:=[op(a), t];
od:
a;
CROSSREFS
Sequence in context: A003816 A309214 A309215 * A083745 A327545 A306072
KEYWORD
sign,base
AUTHOR
N. J. A. Sloane, Aug 10 2019
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 March 29 10:22 EDT 2024. Contains 371268 sequences. (Running on oeis4.)