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.

A000097 Number of partitions of n if there are two kinds of 1's and two kinds of 2's.

This page as a plain text file.
%I A000097 M1361 N0525 #159 Jan 11 2025 18:47:06
%S A000097 1,2,5,9,17,28,47,73,114,170,253,365,525,738,1033,1422,1948,2634,3545,
%T A000097 4721,6259,8227,10767,13990,18105,23286,29837,38028,48297,61053,76926,
%U A000097 96524,120746,150487,187019,231643,286152,352413,432937,530383,648245
%N A000097 Number of partitions of n if there are two kinds of 1's and two kinds of 2's.
%C A000097 Also number of partitions of 2*n with exactly 2 odd parts (offset 1). - _Vladeta Jovovic_, Jan 12 2005
%C A000097 Also number of transitions from one partition of n+2 to another, where a transition consists of replacing any two parts with their sum. Remove all 1' and 2' from the partition, replacing them with ((number of 2') + 1) and ((number of 1') + (number of 2') + 1); these are the two parts being summed. Number of partitions of n into parts of 2 kinds with at most 2 parts of the second kind, or of n+2 into parts of 2 kinds with exactly 2 parts of the second kind. - _Franklin T. Adams-Watters_, Mar 20 2006
%C A000097 From Christian Gutschwager (gutschwager(AT)math.uni-hannover.de), Feb 10 2010: (Start)
%C A000097 a(n) is also the number of pairs of partitions of n+2 which differ by only one box (for bijection see the first Gutschwager link).
%C A000097 a(n) is also the number of partitions of n with two parts marked.
%C A000097 a(n) is also the number of partitions of n+1 with two different parts marked. (End)
%C A000097 Convolution of A000041 and A008619. - _Vaclav Kotesovec_, Aug 18 2015
%C A000097 a(n) = P(/2,n), a particular case of P(/k,n) defined as follows: P(/0,n) = A000041(n) and P(/k,n) = P(/k-1, n) + P(/k-1,n-k) + P(/k-1, n-2k) + ... Also, P(/k,n) = the convolution of A000041 and the partitions of n with exactly k parts, and g.f. P(/k,n) = (g.f. for P(n)) * 1/(1-x)...(1-x^k). - _Gregory L. Simay_, Mar 22 2018
%C A000097 a(n) is also the sum of binomial(D(p),2) in partitions p of (n+3), where D(p)= number of different sizes of parts in p. - _Emily Anible_, Apr 03 2018
%C A000097 Also partitions of 2*(n+1) with alternating sum 2. Also partitions of 2*(n+1) with reverse-alternating sum -2 or 2. - _Gus Wiseman_, Jun 21 2021
%C A000097 Define the distance graph of the partitions of n using the distance function in A366156 as follows: two vertices (partitions) share an edge if and only if the distance between the vertices is 2. Then a(n) is the number of edges in the distance graph of the partitions of n. - _Clark Kimberling_, Oct 12 2023
%D A000097 H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.
%D A000097 J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
%D A000097 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A000097 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A000097 T. D. Noe and Vaclav Kotesovec, <a href="/A000097/b000097.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..1000 from T. D. Noe)
%H A000097 P. J. Cameron, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL3/groups.html">Sequences realized by oligomorphic permutation groups</a>, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.
%H A000097 Christian Gutschwager, <a href="http://arxiv.org/abs/1104.0008">The skew diagram poset and components of skew characters</a>, arXiv:1104.0008 [math.CO], 2011.
%H A000097 Christian Gutschwager, <a href="https://dx.doi.org/10.1016/j.ejc.2010.05.008">Reduced Kronecker products which are multiplicity free or contain only a few components</a>, Eur. J. Combinat. 31 (2010) 1996-2005. doi:10.1016/j.ejc.2010.05.008.
%H A000097 J. P. Robinson, <a href="https://doi.org/10.1016/0097-3165(88)90009-X">Edges in the poset of partitions of an integer</a>, J. Combin. Theory Ser. A, 48 (1988), 236-238.
%H A000097 N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>
%F A000097 Euler transform of 2 2 1 1 1 1 1...
%F A000097 G.f.: 1/( (1-x) * (1-x^2) * Product_{k>=1} (1-x^k) ).
%F A000097 a(n) = Sum_{j=0..floor(n/2)} A000070(n-2*j), n>=0.
%F A000097 a(n) = A014153(n)/2 + A087787(n)/4 + A000070(n)/4. - _Vaclav Kotesovec_, Nov 05 2016
%F A000097 a(n) ~ sqrt(3) * exp(Pi*sqrt(2*n/3)) / (4*Pi^2) * (1 + 35*Pi/(24*sqrt(6*n))). - _Vaclav Kotesovec_, Aug 18 2015, extended Nov 05 2016
%F A000097 a(n) = A120452(n) + A344741(n). - _Gus Wiseman_, Jun 21 2021
%e A000097 a(3) = 9 because we have 3, 2+1, 2+1', 2'+1, 2'+1', 1+1+1, 1+1+1', 1+1'+1' and 1'+1'+1'.
%e A000097 From _Gus Wiseman_, Jun 22 2021: (Start)
%e A000097 The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with exactly 2 odd parts:
%e A000097   (1,1)  (3,1)    (3,3)      (5,3)
%e A000097          (2,1,1)  (5,1)      (7,1)
%e A000097                   (3,2,1)    (3,3,2)
%e A000097                   (4,1,1)    (4,3,1)
%e A000097                   (2,2,1,1)  (5,2,1)
%e A000097                              (6,1,1)
%e A000097                              (3,2,2,1)
%e A000097                              (4,2,1,1)
%e A000097                              (2,2,2,1,1)
%e A000097 The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with alternating sum 2:
%e A000097   (2)  (3,1)    (4,2)        (5,3)
%e A000097        (2,1,1)  (2,2,2)      (3,3,2)
%e A000097                 (3,2,1)      (4,3,1)
%e A000097                 (3,1,1,1)    (3,2,2,1)
%e A000097                 (2,1,1,1,1)  (4,2,1,1)
%e A000097                              (2,2,2,1,1)
%e A000097                              (3,2,1,1,1)
%e A000097                              (3,1,1,1,1,1)
%e A000097                              (2,1,1,1,1,1,1)
%e A000097 (End)
%p A000097 with(numtheory): etr:= proc(p) local b; b:=proc(n) option remember; local d,j; if n=0 then 1 else add(add(d*p(d), d=divisors(j)) *b(n-j), j=1..n)/n fi end end: a:= etr(n->`if`(n<3,2,1)): seq(a(n), n=0..40); # _Alois P. Heinz_, Sep 08 2008
%t A000097 CoefficientList[Series[1/((1 - x) (1 - x^2) Product[1 - x^k, {k, 1, 100}]), {x, 0, 100}], x] (* _Ben Branman_, Mar 07 2012 *)
%t A000097 etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}]*b[n - j], {j, 1, n}]/n]; b]; a = etr[If[# < 3, 2, 1]&]; Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Apr 09 2014, after _Alois P. Heinz_ *)
%t A000097 (1/((1 - x) (1 - x^2) QPochhammer[x]) + O[x]^50)[[3]] (* _Vladimir Reshetnikov_, Nov 22 2016 *)
%t A000097 Table[Length@IntegerPartitions[n,All,Join[{1,2},Range[n]]],{n,0,15}] (* _Robert Price_, Jul 28 2020 and Jun 21 2021 *)
%t A000097 T[n_, 0] := PartitionsP[n];
%t A000097 T[n_, m_] /; (n >= m (m + 1)/2) := T[n, m] = T[n - m, m - 1] + T[n - m, m];
%t A000097 T[_, _] = 0;
%t A000097 a[n_] := T[n + 3, 2];
%t A000097 Table[a[n], {n, 0, 60}] (* _Jean-François Alcover_, May 30 2021 *)
%t A000097 ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];Table[Length[Select[IntegerPartitions[n],ats[#]==2&]],{n,0,30,2}] (* _Gus Wiseman_, Jun 21 2021 *)
%o A000097 (PARI) my(x = 'x + O('x^66)); Vec( 1/((1-x)*(1-x^2)*eta(x)) ) \\ _Joerg Arndt_, Apr 29 2013
%Y A000097 First differences are in A024786.
%Y A000097 Cf. A000098, A000710.
%Y A000097 Third column of Riordan triangle A008951 and of triangle A103923.
%Y A000097 The case of reverse-alternating sum 1 or alternating sum 0 is A000041.
%Y A000097 The case of reverse-alternating sum -1 or alternating sum 1 is A000070.
%Y A000097 The normal case appears to be A004526 or A065033.
%Y A000097 The strict case is A096914.
%Y A000097 The case of reverse-alternating sum 2 is A120452.
%Y A000097 The case of reverse-alternating sum -2 is A344741.
%Y A000097 A001700 counts compositions with alternating sum 2.
%Y A000097 A035363 counts partitions into even parts.
%Y A000097 A058696 counts partitions of 2n.
%Y A000097 A103919 counts partitions by sum and alternating sum (reverse: A344612).
%Y A000097 A124754 gives alternating sums of standard compositions (reverse: A344618).
%Y A000097 A316524 is the alternating sum of the prime indices of n (reverse: A344616).
%Y A000097 A344610 counts partitions by sum and positive reverse-alternating sum.
%Y A000097 A344611 counts partitions of 2n with reverse-alternating sum >= 0.
%Y A000097 Cf. A006330, A027187, A239830, A306145, A343941, A344607, A344608, A344619, A344650, A344651, A344740.
%Y A000097 Shift of A093695.
%K A000097 nonn,easy
%O A000097 0,2
%A A000097 _N. J. A. Sloane_
%E A000097 More terms from Pab Ter (pabrlos(AT)yahoo.com), May 04 2004
%E A000097 Edited by _Emeric Deutsch_, Mar 23 2005
%E A000097 More terms from _Franklin T. Adams-Watters_, Mar 20 2006
%E A000097 Edited by _Charles R Greathouse IV_, Apr 20 2010