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-4 of 4 results.

A033922 Base-2 digital convolution sequence.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5
Offset: 0

Views

Author

Keywords

Comments

Definition: a(0) = 1; for n > 0, let the base-2 representation of n be 2^k_1 + ... + 2^k_i, then a(n) = a(k_1) + ... + a(k_i).
The sequence can be constructed as follows. Let r(n)=[x(1),x(2),...,x(2^n)] denote a run of 2^n elements. Then r(n+1) is a run of length 2^(n+1) defined as the concatenation of r(n) and [x(1)+x(n), x(2)+x(n), ..., x(2^n)+x(n)]. Letting x(1)=0 and x(2)=1 we get r(1)=[0,1], r(2)=[0, 1, 1, 2], r(3)=[0, 1, 1, 2, 1, 2, 2, 3], r(4)=[0, 1, 1, 2, 1, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 5], etc. Replacing the leading zero by 1 in r(infinity) we get A033922. - Benoit Cloitre, Jan 10 2013
Number of 0's in Goodstein base-2 hereditary representation of n. For example, a(266)=5 once that 266 = 2^(2^(2^(2^0)+2^0)) + 2^(2^(2^0)+2^0) + 2^(2^0). - Flávio V. Fernandes, Jul 22 2025

Examples

			For example, 6 = 2^2 + 2^1, so a(6) = a(2) + a(1) = 2.
		

Crossrefs

Cf. A033639, A014221 (n such that a(n)=1), A206774 (first differences).

Programs

  • Maple
    a:= proc(n) option remember; local c, m, t; if n=0 then 1 else m:= n; c:=0; for t from 0 while m<>0 do c:= c+ `if`(irem(m, 2, 'm')=1, a(t), 0) od; c fi end: seq(a(n), n=0..120);  # Alois P. Heinz, Jul 13 2011
  • PARI
    al(n)=local(v,k,e);v=vector(n+1);v[1]=1;for(m=1,n,k=m;e=0;while(k>0,if(k%2,v[m+1]+=v[e+1]);e++;k\=2));v /* Benoit Cloitre, Jan 10 2013 */
    
  • PARI
    /* to compute quickly 2^m terms of the sequence */ m=10;v=[0,1];for(n=2,m,v=concat(v,vector(2^n/2,i,v[i]+v[n])));a(n)=if(n<2,1,v[n]) /* Benoit Cloitre, Jan 16 2013 */

Formula

From Flávio V. Fernandes, Jul 31 2025: (Start)
a(n) = a(2^n).
a(n) = Sum_{k=1..A000120(n)} a(A048793(n,k)-1) for n >= 1. (End)

Extensions

Edited by Franklin T. Adams-Watters, Jul 13 2011

A033640 Base 3 digital convolution sequence.

Original entry on oeis.org

1, 1, 2, 1, 3, 7, 6, 20, 52, 6, 26, 104, 32, 162, 460, 356, 1438, 4048, 712, 3588, 15272, 5012, 27460, 90476, 64944, 300816, 912472, 90476, 155420, 611656, 1067892, 1770024, 4763360, 4151704, 14746316, 39566064, 8915064, 27813084, 109938548, 76294212, 222960908
Offset: 0

Views

Author

Keywords

Examples

			Suppose base = 3 and a(0)..a(13) are 1 1 2 1 3 7 6 20 52 6 26 104 32 162. In base 3, 14 = 112, so we convolve the last three terms with 1, 1, 2 to obtain 104*1+32*1+162*2 = 460.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, (l->
          add(l[i]*a(n-i), i=1..nops(l)))(convert(n, base, 3)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Apr 14 2021

A033647 Base 10 digital convolution sequence.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 40320, 403200, 846720, 2943360, 12620160, 66044160, 408885120, 2928240000, 23834805120, 217441486080, 47669610240, 482552582400, 1060444385280, 4146438320640, 18706642053120, 101826086906880, 648369805547520
Offset: 0

Views

Author

Keywords

Examples

			Suppose base = 3 and a(0)..a(13) are 1 1 2 1 3 7 6 20 52 6 26 104 32 162. In base 3, 14 = 112, so we convolve the last three terms with 1, 1, 2 to obtain 104*1+32*1+162*2 = 460.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, (l->
          add(l[i]*a(n-i), i=1..nops(l)))(convert(n, base, 10)))
        end:
    seq(a(n), n=0..33);  # Alois P. Heinz, Apr 14 2021

A260956 a(0)=1; a(n) = Sum_{k=1..n-1} d(k)*a(n-k), where d(m) is m-th bit in binary expansion of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 5, 10, 10, 13, 23, 43, 66, 122, 231, 462, 462, 528, 759, 1452, 1980, 3201, 5412, 9603, 15015, 26598, 47025, 88638, 162261, 312939, 610863, 1221726, 1221726, 1310364, 1623303, 2547105, 3768831, 6300921, 9234588, 14715360, 21016281, 32797974
Offset: 0

Views

Author

Anders Hellström, Sep 10 2015

Keywords

Crossrefs

Cf. A033639 (when binary digits are taken in the reverse order).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, (l-> add(
          a(n-i)*l[-i], i=1..nops(l)))(convert(n, base, 2)))
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jan 18 2019
  • Mathematica
    a[0] = 1; a[n_] := a[n] = Total[(d = IntegerDigits[n, 2]) * Table[a[n - k], {k, 1, Length[d]}]]; Array[a, 50, 0] (* Amiram Eldar, Jul 25 2023 *)
  • PARI
    first(m)=my(v=vector(m));v[1]=1;v[2]=1;for(i=3,m,v[i]=0;d=digits(i,2);for(j=1,#d,v[i]+=d[j]*v[i-j]));v
    
  • PARI
    lista(nn) = {my(va = vector(nn), vb); va[1] = 1; for (n=2, nn, vb = binary(n); va[n] = sum(k=1, #vb, vb[k]*(if (n==k, 1, va[n-k])));); concat(1, va);} \\ Michel Marcus, Jan 12 2019

Extensions

a(0)=1 prepended by Alois P. Heinz, Jan 18 2019
Showing 1-4 of 4 results.