This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A165418 #12 Dec 31 2017 09:34:57 %S A165418 1,1,1,2,2,3,2,4,4,4,5,8,8,8,4,8,8,8,9,10,8,13,12,20,20,20,21,26,26, %T A165418 20,8,16,16,16,17,16,18,21,20,24,24,16,22,36,34,35,28,48,48,48,49,52, %U A165418 48,55,56,76,76,76,78,76,76,48,16,32,32,32,33,32,34,37,36,36,32,40,42,50,52 %N A165418 a(1) = 1. For n >= 2, a(n) = sum a(k), where k is over the distinct values of the substrings in binary n, and where 1 <= k < n. %C A165418 The distinct positive values of the substrings of binary n is row n of table A165416. %C A165418 a(2^n) = 2^(n-1), for all n >=1. %H A165418 Rémy Sigrist, <a href="/A165418/b165418.txt">Table of n, a(n) for n = 1..8192</a> %H A165418 Rémy Sigrist, <a href="/A165418/a165418.gp.txt">PARI program for A165418</a> %e A165418 9 in binary is 1001. The distinct positive integers that occur as substrings in binary 9 are 1, 2 (10 in binary), 4 (100 in binary), and 9 (1001 in binary). So a(9) = a(1)+a(2)+a(4) = 1 + 1 + 2 = 4. %t A165418 Fold[Function[{a, n}, Append[a, With[{w = IntegerDigits[n, 2]}, Total@ Part[a, Select[Union@ Map[FromDigits[#, 2] &, Apply[Join, Array[Partition[w, #, 1] &, Length@ w]]], Nor[# == 0, # == n] &]]]]], {1}, Range[2, 77]] (* _Michael De Vlieger_, Dec 31 2017 *) %o A165418 (PARI) See Links section. %Y A165418 A165416, A165417 %K A165418 base,nonn %O A165418 1,4 %A A165418 _Leroy Quet_, Sep 17 2009 %E A165418 More terms from _Sean A. Irvine_, Nov 19 2009