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!)
A031248 a(n)=(# 1's)-(# 2's) in first n terms of A031235. 0
1, 0, 0, 0, 0, 1, 2, 3, 2, 3, 3, 4, 4, 5, 5, 4, 5, 4, 3, 2, 2, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 3, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, 7, 8, 9, 10, 9, 10, 11, 11, 12, 13, 13, 14, 15, 15, 14, 15, 16, 15, 16, 15, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
LINKS
MATHEMATICA
Accumulate[Which[#==1, 1, #==2, -1, True, 0]&/@(Reverse[IntegerDigits[ #, 5]]&/@ Range[ 0, 40]//Flatten)] (* Harvey P. Dale, Aug 02 2016 *)
CROSSREFS
Sequence in context: A112212 A102314 A205146 * A030582 A217438 A036762
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 November 30 21:14 EST 2023. Contains 367462 sequences. (Running on oeis4.)