This site is supported by donations to The OEIS Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A129922 Number of 3-Carlitz compositions of n (or, more generally p-Carlitz compositions, p > 1), i.e., words b_1^{i_1}b_2^{i_2}...b_k^{i_k} such that the b_j's and i_j's are positive integers for which Sum_{j=1..k} i_j * b_j = n and, for all j, i_j < p and if b_j = b_(j+1) then i_j + i_(j+1) is not equal to p. 2
 1, 1, 3, 4, 12, 22, 51, 101, 225, 465, 1008, 2111, 4528, 9560, 20402, 43222, 92018, 195256, 415243, 881758, 1874288, 3981318, 8460906, 17975132, 38196045, 81152769, 172436680, 366376845, 778476016, 1654054258, 3514494256, 7467412436, 15866507485, 33712418692, 71630875356, 152198161794 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS For p=2, the sequence enumerates Carlitz compositions, A003242. LINKS Alois P. Heinz, Table of n, a(n) for n = 0..1000 Sylvie Corteel, PaweÅ‚ Hitczenko, Generalizations of Carlitz Compositions, Journal of Integer Sequences, Vol. 10 (2007), Article 07.8.8. FORMULA G.f.: 1/(1 - Sum_{k>0} (z^k/(1-z^k) - 3*z^(k*3)/(1-z^(k*3)))). For general p the generating function is 1/(1 - Sum_{k>0}(z^k/(1-z^k) - p*z^(k*p)/(1-z^(k*p)))). EXAMPLE a(3)=4 because, for p=3, we can write:   3^{1},   1^{1} 2^{1},   2^{1} 1^{1},   1^{1} 1^{1} 1^{1}. MAPLE b:= proc(n, i, j) option remember;      `if`(n=0, 1, add(add(`if`(k=i and m+j=3, 0,       b(n-k*m, k, m)), m=1..min(2, n/k)), k=1..n))     end: a:= n-> b(n, 0\$2): seq(a(n), n=0..40);  # Alois P. Heinz, Jul 22 2017 PROG (PARI) N = 66;  x = 'x + O('x^N);  p=3; gf = 1/(1-sum(k=1, N, x^k/(1-x^k)-p*x^(k*p)/(1-x^(k*p)))); Vec(gf)  /* Joerg Arndt, Apr 28 2013 */ CROSSREFS Cf. A129921. Cf. A003242. Sequence in context: A075220 A075221 A295948 * A005221 A243391 A000206 Adjacent sequences:  A129919 A129920 A129921 * A129923 A129924 A129925 KEYWORD nonn AUTHOR Pawel Hitczenko (phitczenko(AT)math.drexel.edu), Jun 05 2007 EXTENSIONS Added more terms, Joerg Arndt, Apr 28 2013 STATUS approved

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

Last modified January 17 10:30 EST 2019. Contains 319218 sequences. (Running on oeis4.)