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!)
A131813 a(n+1) = number of preceding terms that are contained in a(n) in binary; a(0)=0. 3
0, 1, 1, 2, 4, 5, 5, 6, 5, 7, 3, 3, 4, 6, 8, 7, 6, 9, 7, 7, 8, 8, 9, 8, 10, 8, 11, 10, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 9, 11, 13, 15, 10, 12, 14, 16, 12, 15, 11, 14, 17, 12, 16, 13, 16, 14, 18, 12, 17, 13, 17, 14, 19, 14, 20, 15, 12, 18, 13, 18, 14, 21, 13, 19, 15, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

a(n+1) = #{k: a(k) substring of a(n) in binary representation, 0<=k<=n}.

a(A131814(n)) = n and a(m) <> n for m < A131814(n).

This is an interesting sequence to listen to. - N. J. A. Sloane, Sep 28 2007

LINKS

R. Zumkeller, Table of n, a(n) for n = 0..25000

Index entries for sequences related to binary expansion of n

EXAMPLE

a(8) = #{a(0), a(1), a(2), a(3), a(7)} = 5;

a(9) = #{a(0), a(1), a(2), a(3), a(5), a(6), a(8)} = 7;

a(10) = #{a(1), a(2), a(9)} = 3.

PROG

(Haskell)

import Data.List (isInfixOf)

a131813 n = a131813_list !! n

a131813_list = 0 : f [[0]] where

   f xss = y : f (bin y : xss) where

     y = sum $ map (fromEnum . (flip isInfixOf $ head xss)) xss

   bin n = if n == 0 then [] else b : bin n' where (n', b) = divMod n 2

-- Reinhard Zumkeller, May 23 2013

CROSSREFS

Cf. A007088, A137655, A030308.

Sequence in context: A317749 A253415 A227401 * A083038 A061008 A256720

Adjacent sequences:  A131810 A131811 A131812 * A131814 A131815 A131816

KEYWORD

nonn,base,hear,look

AUTHOR

Reinhard Zumkeller, Jul 18 2007, Feb 01 2008

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 May 13 19:36 EDT 2021. Contains 343868 sequences. (Running on oeis4.)