OFFSET
0,4
COMMENTS
a(n+1) = #{k: a(k) substring of a(n) in binary representation, 0<=k<=n}.
This is an interesting sequence to listen to. - N. J. A. Sloane, Sep 28 2007
LINKS
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
AUTHOR
Reinhard Zumkeller, Jul 18 2007, Feb 01 2008
STATUS
approved