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.

A118096 Number of partitions of n such that the largest part is twice the smallest part.

This page as a plain text file.
%I A118096 #48 Jun 16 2025 09:50:47
%S A118096 0,0,1,1,2,3,3,4,6,6,6,10,9,11,13,14,15,20,18,23,25,27,27,37,35,39,43,
%T A118096 48,49,61,57,68,72,78,81,97,95,107,114,127,128,150,148,168,179,191,
%U A118096 198,229,230,254,266,291,300,338,344,379,398,427,444,498,505,550,580,625
%N A118096 Number of partitions of n such that the largest part is twice the smallest part.
%C A118096 Also number of partitions of n such that if the largest part occurs k times, then the number of parts is 2k. Example: a(8)=4 because we have [7,1], [6,2], [5,3] and [3,3,1,1].
%H A118096 Vaclav Kotesovec, <a href="/A118096/b118096.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Alois P. Heinz)
%F A118096 G.f.: Sum_{k>=1} x^(3*k)/Product_{j=k..2*k} (1-x^j).
%F A118096 a(n) ~ exp(Pi*sqrt(2*n/15)) / (5^(1/4)*sqrt(2*phi*n)), where phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - _Vaclav Kotesovec_, Jun 13 2025
%e A118096 a(8)=4 because we have [4,2,2], [2,2,2,1,1], [2,2,1,1,1,1] and [2,1,1,1,1,1,1].
%p A118096 g:=sum(x^(3*k)/product(1-x^j,j=k..2*k),k=1..30): gser:=series(g,x=0,75): seq(coeff(gser,x,n),n=1..70);
%p A118096 # second Maple program:
%p A118096 b:= proc(n, i, t) option remember: `if`(n=0, 1, `if`(i<t, 0,
%p A118096        b(n, i-1, t)+`if`(i>n, 0, b(n-i, i, t))))
%p A118096     end:
%p A118096 a:= n-> add(b(n-3*j, 2*j, j), j=1..n/3):
%p A118096 seq(a(n), n=1..64);  # _Alois P. Heinz_, Sep 04 2017
%t A118096 Table[Count[IntegerPartitions[n], p_ /; 2 Min[p] = = Max[p]], {n, 40}] (* _Clark Kimberling_, Feb 16 2014 *)
%t A118096 (* Second program: *)
%t A118096 b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i < t, 0,
%t A118096      b[n, i - 1, t] + If[i > n, 0, b[n - i, i, t]]]];
%t A118096 a[n_] := Sum[b[n - 3j, 2j, j], {j, 1, n/3}];
%t A118096 Array[a, 64] (* _Jean-François Alcover_, Jun 04 2021, after _Alois P. Heinz_ *)
%t A118096 (* Third program: *)
%t A118096 nmax = 100; p = 1; s = 0; Do[p = Simplify[p*(1 - x^(2*k - 1))*(1 - x^(2*k))/(1 - x^k)]; p = Normal[p + O[x]^(nmax+1)]; s += x^(3*k)/(1 - x^k)/p;, {k, 1, nmax}]; Rest[CoefficientList[Series[s, {x, 0, nmax}], x]] (* _Vaclav Kotesovec_, Jun 16 2025 *)
%o A118096 (PARI) my(N=70, x='x+O('x^N)); concat([0, 0], Vec(sum(k=1, N, x^(3*k)/prod(j=k, 2*k, 1-x^j)))) \\ _Seiichi Manyama_, May 14 2023
%Y A118096 Cf. A237825, A237826, A237827.
%Y A118096 Cf. A008483, A117086, A238479, A350893.
%K A118096 nonn
%O A118096 1,5
%A A118096 _Emeric Deutsch_, Apr 12 2006