login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118269 See sequence A118268 for description. 2
1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 2, 1, 0, 1, 0, 3, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 1, 2, 2, 2, 0, 0, 0, 1, 1, 0, 1, 0, 4, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 2, 0, 0, 1, 3, 1, 2, 0, 2, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 1, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,22

LINKS

Michael De Vlieger, Table of n, a(n) for n = 0..10000

MATHEMATICA

MapAt[# + 1 &, #, 1] &@ FoldList[{#1~Join~IntegerDigits[#2, 2], #2} & @@ {First@ #1, SequenceCount[First@ #1, IntegerDigits[#2, 2]]} &, {{1}, 0}, Range@ 104][[All, -1]] (* Michael De Vlieger, Sep 30 2017 *)

PROG

Contribution from Franklin T. Adams-Watters, May 14 2010: (Start)

(PARI) inbase(n, b=10)=local(r); r=[n%b]; while((n\=b)>0, r=concat([n%b], r)); r

countsub(v, w)=local(r); r=max(#v-#w+1, 0); for(k=1, #v-#w+1, for(j=1, #w, if(v[k+j-1]!=w[j], r--; break))); r

al(n)=local(v, r, ni); v=r=[1]; for(k=1, n, ni=countsub(v, inbase(k, 2)); v=concat(v, inbase(ni, 2)); r=concat(r, [ni])); print(v); r

/* Prints A118268, returns A118269. */ (End)

CROSSREFS

Cf. A118268.

Sequence in context: A029406 A158461 A281498 * A144152 A265674 A229297

Adjacent sequences:  A118266 A118267 A118268 * A118270 A118271 A118272

KEYWORD

easy,nonn

AUTHOR

Leroy Quet, Apr 20 2006

EXTENSIONS

More terms from Franklin T. Adams-Watters, May 14 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 11 19:49 EDT 2021. Contains 342888 sequences. (Running on oeis4.)