login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 24
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
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.
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 *)
PROG
(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)))}
CROSSREFS
Sequence in context: A251138 A144462 A370559 * A059426 A245977 A082389
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Aug 27 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 7 20:13 EDT 2024. Contains 372317 sequences. (Running on oeis4.)