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!)
A030350 a(n) = (# 1's)-(# 2's) in first n terms of A030341. 0
0, 1, 0, 0, 1, 2, 3, 2, 3, 3, 2, 3, 2, 1, 0, 0, 0, 1, 2, 2, 3, 2, 2, 3, 3, 4, 5, 6, 7, 8, 7, 8, 9, 9, 8, 9, 10, 9, 10, 9, 8, 9, 9, 9, 8, 9, 9, 8, 7, 7, 6, 6, 7, 6, 7, 8, 7, 6, 7, 6, 6, 5, 4, 5, 4, 3, 2, 1, 0, 0, 0, 0, 1, 2, 2, 2, 3, 2, 2, 2, 3, 3, 4, 4, 5, 6, 7, 7, 8, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
For k >= 1, a(3^k * (k - 1/2) + 1/2) = 1 and a(3^k * (k - 1/2) + 3/2) = a(3^k * (k - 1/2) + 5/2) = 0. - Robert Israel, Jun 23 2024
LINKS
MAPLE
R:= 0: t:= 0:
for i from 1 to 100 do
L:= convert(i, base, 3);
for j from 1 to nops(L) do
if L[j] = 1 then t:= t+1 elif L[j] = 2 then t:= t-1 fi;
R:= R, t;
od
od:
R; # Robert Israel, Jun 23 2024
CROSSREFS
Cf. A030341.
Sequence in context: A200323 A075370 A332297 * A026240 A124474 A282162
KEYWORD
nonn,look,changed
AUTHOR
EXTENSIONS
a(1) = 0 inserted by Robert Israel, Jun 23 2024
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 June 30 08:10 EDT 2024. Contains 373861 sequences. (Running on oeis4.)