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.

A170838 G.f.: Product_{k>=0} (1 + x^(2^k-1) + 3x^(2^k)).

Original entry on oeis.org

2, 5, 9, 11, 11, 24, 36, 29, 11, 24, 38, 44, 57, 108, 135, 83, 11, 24, 38, 44, 57, 108, 137, 98, 57, 110, 158, 189, 279, 459, 486, 245, 11, 24, 38, 44, 57, 108, 137, 98, 57, 110, 158, 189, 279, 459, 488, 260, 57, 110, 158, 189, 279, 461, 509, 351, 281, 488, 663, 846, 1296
Offset: 0

Views

Author

N. J. A. Sloane, Jan 02 2010

Keywords

Crossrefs

A170838-A170852, A170854-A170872 were added to supplement Gary W. Adamson's A162956.

Programs

  • Maple
    Maple program for A170838-A170852, A162956, A170854-A170872.
    read format;
    G := proc(a,b,c); mul( 1 + a*x^(2^n-1) + b*x^(2^n), n=c..20); end;
    f := proc(a,b,c) seriestolist(series(G(a,b,c),x,120)); end;
    at:=170838:
    for a from 1 to 2 do for c from 0 to 2 do
    b:=3;
    t1:=f(a,b,c);
    lprint( format(t1,at) );
    lprint("G.f.: Prod_{k >= ", c, "} (1 +",a,"* x^(2^k-1) +",b,"* x^(2^k)).");
    at:=at+1; od: od:
    for b from 1 to 3 do for c from 0 to 2 do
    a:=3;
    t1:=f(a,b,c);
    lprint( format(t1,at) );
    lprint("G.f.: Prod_{k >= ", c, "} (1 +",a,"* x^(2^k-1) +",b,"* x^(2^k)).");
    at:=at+1; od: od:
    h:=proc(r,s,a,b) local s1,n,i,j;
    s1:=array(0..120);
    s1[0]:=r; s1[1]:=s;
    for n from 2 to 120 do i:=floor(log(n)/log(2));
    j:=n-2^i; s1[n]:=a*s1[j]+b*s1[j+1]; od:
    [seq(s1[n],n=0..120)];
    end;
    l1:=[[0,1],[1,0],[1,1],[1,2]];
    l2:=[[3,1],[3,2],[1,3],[2,3],[3,3]];
    for i from 1 to 4 do for j from 1 to 5 do
    r:=l1[i][1];
    s:=l1[i][2];
    a:=l2[j][1];
    b:=l2[j][2];
    t1:=h(r,s,a,b);
    lprint(format(t1,at)); at:=at+1;
    lprint("a(0)=",r,", a(1)=", s, "; a(2^i+j)=",a,"*a(j)+",b,"a(j+1) for 0 <= j < 2^i.");
    od: od:
  • Mathematica
    With[{nn=60},CoefficientList[Series[Product[1+x^(2^k-1)+3x^2^k,{k,0,nn}],{x,0,nn}],x]] (* Harvey P. Dale, Dec 29 2021 *)