cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A165417 a(0) = 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 0 <= k < n.

Original entry on oeis.org

1, 1, 2, 1, 4, 4, 5, 2, 8, 8, 8, 9, 14, 14, 12, 4, 16, 16, 16, 17, 20, 16, 23, 20, 36, 36, 36, 37, 42, 42, 28, 8, 32, 32, 32, 33, 32, 36, 39, 36, 48, 48, 32, 42, 64, 60, 57, 44, 88, 88, 88, 89, 96, 88, 97, 96, 128, 128, 128, 130, 116, 116, 64, 16, 64, 64, 64, 65, 64, 68, 71, 68, 72
Offset: 0

Views

Author

Leroy Quet, Sep 17 2009

Keywords

Comments

The distinct nonnegative values of the substrings of binary n is row n of table A119709.
a(2^n) = 2^n, for all n.

Examples

			9 in binary is 1001. The distinct nonnegative integers that occur as substrings in binary 9 are 0, 1, 2 (10 in binary), 4 (100 in binary), and 9 (1001 in binary). So a(9) = a(0)+a(1)+a(2)+a(4) = 1 + 1 + 2 + 4 = 8.
		

Crossrefs

Extensions

Extended by Ray Chandler, Mar 13 2010

A175491 a(1)=1. a(n+1) = Sum_{k=1..n} a(b(k,n)), where b(k,n) is the largest positive integer that, when written in binary, occurs as a substring in both binary k and binary n.

Original entry on oeis.org

1, 1, 2, 4, 7, 11, 17, 25, 35, 49, 64, 89, 122, 174, 235, 286, 334, 407, 473, 581, 690, 824, 976, 1206, 1449, 1811, 2183, 2718, 3306, 4173, 5070, 5659, 6071, 6769, 7279, 8137, 8716, 9765, 10587, 11907, 12940, 14631, 15649, 17600, 19231, 21729, 24004, 27228
Offset: 1

Views

Author

Leroy Quet, May 28 2010

Keywords

Examples

			a(6)=11 because 5=(101)2 and
for k=1=(1)2 CS (1)2 and a(1)=1
for k=2=(10)2 CS (10)2=2 and a(2)=1
for k=3=(11)2 CS (1)2 and a(1)=1
for k=4=(100)2 CS (10)2=2 and a(2)=1
for k=5=(101)2 CS (101)2=5 and a(5)=7
and the sum of these 5 terms is 11.
(CS stands for "largest common substring is").
		

Crossrefs

Programs

  • PARI
    See Links section.

Extensions

More terms from Lars Blomberg, Feb 25 2016

A360296 a(1) = 1, and for any n > 1, a(n) is the sum of the terms of the sequence at indices k < n whose binary digits appear in order but not necessarily as consecutive digits in the binary representation of n.

Original entry on oeis.org

1, 1, 1, 2, 3, 3, 2, 4, 8, 11, 8, 8, 11, 8, 4, 8, 20, 34, 26, 34, 51, 40, 20, 20, 40, 51, 34, 26, 34, 20, 8, 16, 48, 96, 76, 118, 186, 152, 76, 96, 208, 281, 186, 152, 208, 124, 48, 48, 124, 208, 152, 186, 281, 208, 96, 76, 152, 186, 118, 76, 96, 48, 16, 32
Offset: 1

Views

Author

Rémy Sigrist, Feb 02 2023

Keywords

Comments

This sequence is a variant of A165418.

Examples

			The first terms, alongside the corresponding k's, are:
  n   a(n)  k's
  --  ----  ------------------
   1     1  N/A
   2     1  {1}
   3     1  {1}
   4     2  {1, 2}
   5     3  {1, 2, 3}
   6     3  {1, 2, 3}
   7     2  {1, 3}
   8     4  {1, 2, 4}
   9     8  {1, 2, 3, 4, 5}
  10    11  {1, 2, 3, 4, 5, 6}
  11     8  {1, 2, 3, 5, 7}
  12     8  {1, 2, 3, 4, 6}
  13    11  {1, 2, 3, 5, 6, 7}
  14     8  {1, 2, 3, 6, 7}
  15     4  {1, 3, 7}
  16     8  {1, 2, 4, 8}
		

Crossrefs

Programs

  • PARI
    { for (n=1, #a=vector(64), print1 (a[n]=if (n==1, 1, s = [1]; b = binary(n); for (k=2, #b, s = setunion(s, apply(v -> 2*v+b[k], s))); sum(k=1, #s-1, a[s[k]]);)", ")) }

Formula

a(n) = Sum_{k = 1..A301977(n-1)} a(A301983(n, k)) for any n > 1.
a(2^k) = 2^(k-1) for any k > 0.
a(2^k-1) = 2^(k-2) for any k > 1.
a(n) >= A165418(n).
Showing 1-3 of 3 results.