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.

A112104 Unique sequence of 1's and 2's where g.f. A(x) satisfies A(x) = B(B(x)) such that B(x) is an integer series, with A(0) = 0.

Original entry on oeis.org

1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1
Offset: 1

Views

Author

Paul D. Hanna, Aug 27 2005

Keywords

Examples

			G.f.: A(x) = x + 2*x^2 + 2*x^3 + x^4 + 2*x^5 + x^6 +...
then A(x) = B(B(x)) where
B(x) = x + x^2 + x^5 - 3*x^6 + 7*x^7 - 10*x^8 - 5*x^9 +...
is the g.f. of A112105.
		

Crossrefs

Programs

  • Mathematica
    kmax = 105;
    A[x_] := Sum[a[k] x^k, {k, kmax}];
    B[x_] := Sum[b[k] x^k, {k, kmax}];
    sol = {a[1] -> 1, b[1] -> 1};
    Do[Print["k = ", k]; sc = SeriesCoefficient[B[(B[x] /. sol) + O[x]^(k+1)] - A[x], {x, 0, k}] /. sol; r = Reduce[(a[k] == 1 || a[k] == 2) && sc == 0, {a[k], b[k]}, Integers]; sol = Join[r // ToRules, sol], {k, 2, kmax}];
    a /@ Range[kmax] /. sol (* Jean-François Alcover, Nov 05 2019 *)
  • PARI
    {a(n,m=2)=local(F=x+x^2+x*O(x^n),G);if(n<1,0, for(k=3,n, G=F+x*O(x^k);for(i=1,m-1,G=subst(F,x,G)); F=F-((polcoeff(G,k)-1)\m)*x^k); G=F+x*O(x^n);for(i=1,m-1,G=subst(F,x,G)); return(polcoeff(G,n,x)))}

A112105 G.f. A(x) satisfies A(A(x)) = B(x) such that the coefficients of B(x) consist of all 1's and 2's, with A(0) = 0.

Original entry on oeis.org

1, 1, 0, 0, 1, -3, 7, -10, -5, 84, -248, 90, 2160, -7541, -5846, 122824, -186259, -2036532, 8665409, 36714511, -345711246, -517802065, 14415153844, -9423161197, -653074772917, 1896978939457, 32374651932128, -184814895196023, -1733326272860598, 16839263882542991, 96742403684106435
Offset: 1

Views

Author

Paul D. Hanna, Aug 27 2005

Keywords

Examples

			A(x) = x + x^2 + x^5 - 3*x^6 + 7*x^7 - 10*x^8 - 5*x^9 +...
where A(A(x)) = x + 2*x^2 + 2*x^3 + x^4 + 2*x^5 + x^6 +... is the g.f. of A112104.
		

Crossrefs

Programs

  • Mathematica
    kmax = 40;
    A[x_] := Sum[a[k] x^k, {k, kmax}];
    B[x_] := Sum[b[k] x^k, {k, kmax}];
    sol = {a[1] -> 1, b[1] -> 1};
    Do[sc = SeriesCoefficient[A[(A[x] /. sol) + O[x]^(k+1)] - B[x], {x, 0, k}] /. sol; r = Reduce[(b[k] == 1 || b[k] == 2) && sc == 0, {a[k], b[k]}, Integers]; sol = Join[r // ToRules, sol], {k, 2, kmax}];
    a /@ Range[kmax] /. sol (* Jean-François Alcover, Nov 05 2019 *)
  • PARI
    {a(n,m=2)=local(F=x+x^2+x*O(x^n),G);if(n<1,0, for(k=3,n, G=F+x*O(x^k);for(i=1,m-1,G=subst(F,x,G)); F=F-((polcoeff(G,k)-1)\m)*x^k); return(polcoeff(F,n,x)))}

A112107 G.f. A(x) satisfies A(A(A(x))) = B(x) (3rd self-COMPOSE of A) such that the coefficients of B(x) consist only of numbers {1,2,3}, with B(0) = 0.

Original entry on oeis.org

1, 1, -1, 3, -10, 35, -119, 360, -792, -33, 12779, -82525, 305861, -552011, -126321, -8385020, 138177591, -433073834, -5366414982, 51203452090, 123835509276, -4174647911014, 5274854624423, 373574363131841, -2054088594386738, -34047892948849106, 391005463740951942
Offset: 1

Views

Author

Paul D. Hanna, Aug 27 2005

Keywords

Examples

			A(x) = x + x^2 - x^3 + 3*x^4 - 10*x^5 + 35*x^6 - 119*x^7 + ...
where A(A(A(x))) = x + 3*x^2 + 3*x^3 + 3*x^4 + 2*x^5 + ...
is the g.f. of A112106.
		

Crossrefs

Programs

  • PARI
    {a(n,m=3)=local(F=x+x^2+x*O(x^n),G);if(n<1,0, for(k=3,n, G=F+x*O(x^k);for(i=1,m-1,G=subst(F,x,G)); F=F-((polcoeff(G,k)-1)\m)*x^k); return(polcoeff(F,n,x)))}
Showing 1-3 of 3 results.