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.

A052536 Number of compositions of n when parts 1 and 2 are of two kinds.

This page as a plain text file.
%I A052536 #42 Jul 02 2025 16:01:58
%S A052536 1,2,6,17,49,141,406,1169,3366,9692,27907,80355,231373,666212,1918281,
%T A052536 5523470,15904198,45794313,131859469,379674209,1093228314,3147825473,
%U A052536 9063802210,26098178316,75146709475,216376326215,623030800329
%N A052536 Number of compositions of n when parts 1 and 2 are of two kinds.
%C A052536 The g.f. for compositions of k_1 kinds of 1's, k_2 kinds of 2's, ..., k_j kinds of j's, ... is 1/(1 - Sum_{j>=1} k_j * x^j). - _Joerg Arndt_, Jul 06 2011
%H A052536 Michael De Vlieger, <a href="/A052536/b052536.txt">Table of n, a(n) for n = 0..2177</a>
%H A052536 Paul Barry, <a href="https://arxiv.org/abs/2104.01644">Centered polygon numbers, heptagons and nonagons, and the Robbins numbers</a>, arXiv:2104.01644 [math.CO], 2021.
%H A052536 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=467">Encyclopedia of Combinatorial Structures 467</a>
%H A052536 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,-1).
%F A052536 G.f.: (1-x)/(1 - 3*x + x^3).
%F A052536 G.f.: 1/(1 - (2*x + 2*x^2 + Sum_{j>=3} x^j)). - _Joerg Arndt_, Jul 06 2011
%F A052536 a(n) = Sum(-(1/9)*(-2 + r^2 - r)*r^(-1-n)), r = RootOf(1 - 3*x + x^3).
%F A052536 a(0)=1, a(1)=2, a(2)=6, a(n) = 3*a(n-1) - a(n-3) for n >= 3. - _Emeric Deutsch_, Apr 10 2005
%F A052536 a(n) = left term in M^n * [1 0 0], where M = the 3 X 3 matrix [2 1 1 / 1 1 0 / 1 0 0]. Right term in M^n *[1 0 0] is a(n-1); middle term is A076264(n-1). - _Gary W. Adamson_, Sep 05 2005
%F A052536 3*a(n) = A123891(n+1). - _Jeffrey R. Goodwin_, Jul 03 2011
%e A052536 a(2)=6 because we have (2),(2'),(1,1),(1,1'),(1',1) and (1',1').
%p A052536 spec := [S,{S=Sequence(Union(Z,Prod(Z,Union(Z,Sequence(Z)))))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
%t A052536 a[0] = 1; a[1] = 2; a[2] = 6; a[n_] := a[n] = 3*a[n-1] - a[n-3]; Table[a[n], {n, 0, 26}] (* _Jean-François Alcover_, Jun 12 2013, after _Emeric Deutsch_ *)
%o A052536 (PARI) Vec((1-x)/(1-3*x+x^3)+O(x^99)) \\ _Charles R Greathouse IV_, Nov 20 2011
%Y A052536 Row sums of A105478.
%Y A052536 Cf. A105478, A076264.
%K A052536 easy,nonn
%O A052536 0,2
%A A052536 encyclopedia(AT)pommard.inria.fr, Jan 25 2000
%E A052536 More terms from _James Sellers_, Jun 06 2000
%E A052536 Edited by _Emeric Deutsch_, Apr 10 2005
%E A052536 More terms from _Gary W. Adamson_, Sep 05 2005