The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A031232 a(n)=(# 1's)-(# 2's) in first n terms of A031219. 0
1, 0, 0, 0, 1, 1, 2, 3, 4, 3, 4, 4, 5, 5, 4, 4, 3, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 4, 3, 4, 4, 4, 5, 5, 5, 6, 7, 7, 8, 9, 10, 11, 12, 11, 12, 13, 13, 14, 15, 15, 16, 15, 15, 16, 15, 16, 17, 16 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
LINKS
MATHEMATICA
Accumulate[Which[#==1, 1, #==2, -1, True, 0]&/@Flatten@IntegerDigits[ Range@ 40, 5]] (* Harvey P. Dale, Apr 26 2019 *)
CROSSREFS
Sequence in context: A097477 A059572 A031249 * A362024 A030583 A030563
KEYWORD
nonn
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 May 27 02:05 EDT 2024. Contains 372847 sequences. (Running on oeis4.)