The OEIS is supported by the many generous donors to the OEIS Foundation.

 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 Table of n, a(n) for n=1..82. 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 Adjacent sequences: A031245 A031246 A031247 * A031249 A031250 A031251 KEYWORD nonn AUTHOR Clark Kimberling 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.

Last modified November 30 21:14 EST 2023. Contains 367462 sequences. (Running on oeis4.)