login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Partitions with parts repeated at most twice and repetition only allowed if first part has an odd index (first index = 1).
3

%I #44 Mar 06 2020 09:19:56

%S 1,1,2,2,4,4,7,8,11,14,19,22,30,36,46,55,70,83,104,123,151,179,218,

%T 256,309,363,433,507,602,701,828,961,1127,1306,1525,1759,2046,2355,

%U 2725,3129,3609,4131,4750,5424,6214,7081,8090,9195,10478,11886,13506,15290,17335,19583,22154,24981,28197,31741,35757,40176,45176

%N Partitions with parts repeated at most twice and repetition only allowed if first part has an odd index (first index = 1).

%H Alois P. Heinz, <a href="/A227134/b227134.txt">Table of n, a(n) for n = 0..10000</a>

%F Conjecture: A227134(n) + A227135(n) = A182372(n) for n >= 0, see comment in A182372.

%F G.f.: 1/(1-x) + Sum_{n>=2} x^A002620(n+1) / Product_{k=1..n} (1-x^k), where A002620(n) = floor(n/2)*ceiling(n/2) forms the quarter-squares. - _Paul D. Hanna_, Jul 06 2013

%F a(n) ~ c * exp(Pi*sqrt(2*n/5)) / n^(3/4), where c = 1 / (2^(1/4)*sqrt(5*(1 + sqrt(5)))) = 0.2090492823352... - _Vaclav Kotesovec_, May 28 2018, updated Mar 06 2020

%e G.f.: 1 + x + 2*x^2 + 2*x^3 + 4*x^4 + 4*x^5 + 7*x^6 + 8*x^7 + 11*x^8 + ...

%e G.f.: 1/(1-x) + x^2/((1-x)*(1-x^2)) + x^4/((1-x)*(1-x^2)*(1-x^3)) + x^6/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)) + x^9/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)*(1-x^5)) + x^12/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)*(1-x^5)*(1-x^6))) + ...

%e There are a(13)=36 such partitions, displayed here as partitions into two sorts of parts (format P:S for sort:part) where the first sort is 0 and sorts oscillate:

%e 01: [ 1:0 1:1 2:0 2:1 3:0 4:1 ]

%e 02: [ 1:0 1:1 2:0 2:1 7:0 ]

%e 03: [ 1:0 1:1 2:0 3:1 6:0 ]

%e 04: [ 1:0 1:1 2:0 4:1 5:0 ]

%e 05: [ 1:0 1:1 2:0 9:1 ]

%e 06: [ 1:0 1:1 3:0 3:1 5:0 ]

%e 07: [ 1:0 1:1 3:0 8:1 ]

%e 08: [ 1:0 1:1 4:0 7:1 ]

%e 09: [ 1:0 1:1 5:0 6:1 ]

%e 10: [ 1:0 1:1 11:0 ]

%e 11: [ 1:0 2:1 3:0 3:1 4:0 ]

%e 12: [ 1:0 2:1 3:0 7:1 ]

%e 13: [ 1:0 2:1 4:0 6:1 ]

%e 14: [ 1:0 2:1 5:0 5:1 ]

%e 15: [ 1:0 2:1 10:0 ]

%e 16: [ 1:0 3:1 4:0 5:1 ]

%e 17: [ 1:0 3:1 9:0 ]

%e 18: [ 1:0 4:1 8:0 ]

%e 19: [ 1:0 5:1 7:0 ]

%e 20: [ 1:0 12:1 ]

%e 21: [ 2:0 2:1 3:0 6:1 ]

%e 22: [ 2:0 2:1 4:0 5:1 ]

%e 23: [ 2:0 2:1 9:0 ]

%e 24: [ 2:0 3:1 4:0 4:1 ]

%e 25: [ 2:0 3:1 8:0 ]

%e 26: [ 2:0 4:1 7:0 ]

%e 27: [ 2:0 5:1 6:0 ]

%e 28: [ 2:0 11:1 ]

%e 29: [ 3:0 3:1 7:0 ]

%e 30: [ 3:0 4:1 6:0 ]

%e 31: [ 3:0 10:1 ]

%e 32: [ 4:0 4:1 5:0 ]

%e 33: [ 4:0 9:1 ]

%e 34: [ 5:0 8:1 ]

%e 35: [ 6:0 7:1 ]

%e 36: [13:0 ]

%p ## Computes A227134 and A227135 in order n^2 time and order n^2 memory:

%p a34:=proc(n) # n-th term of A227134

%p return oddMin(n,1):

%p end proc:

%p a35:=proc(n) # n-th term of A227135

%p return evenMin(n,1):

%p end proc:

%p # oddMin(n,m) finds number of partitions of n (as in A227134) but with the

%p # minimum part AT LEAST m

%p oddMin:=proc(n, m) option remember:

%p if(n=0) then return 1: fi: ## Start base cases

%p if((n<0) or (m>n)) then return 0: fi:

%p if(n=m) then return 1: fi: ## End base cases

%p return oddMin(n, m+1) + evenMin(n-m, m+1) + oddMin(n-2*m, m+1): ## How many times is the element m in the partition

%p end proc:

%p # evenMin(n,m) finds number of partitions of n (as in A227135) but with the

%p # minimum part AT LEAST m

%p evenMin:=proc(n, m) option remember:

%p if(n=0) then return 1: fi: ## Start base cases

%p if((n<0) or (m>n)) then return 0: fi:

%p if(n=m) then return 1: fi: ## End base cases

%p return evenMin(n, m+1) + oddMin(n-m, m+1): ## Is the element m in the partition

%p end proc:

%p ## _Patrick Devlin_, Jul 02 2013

%p # second Maple program:

%p b:= proc(n, i, t) option remember; `if`(n=0, t,

%p `if`(i*(i+1)<n, 0, add(b(n-i*j, i-1,

%p irem(t+j, 2)), j=0..min(t+1, n/i))))

%p end:

%p a:= n-> add(b(n$2, t), t=0..1):

%p seq(a(n), n=0..60); # _Alois P. Heinz_, Feb 15 2017

%t nMax = 60; 1/(1-x) + Sum[x^Floor[(n+1)^2/4]/Product[1-x^k, {k, 1, n}], {n, 2, Ceiling @ Sqrt[4*nMax]}] + O[x]^(nMax+1) // CoefficientList[#, x]& (* _Jean-François Alcover_, Feb 15 2017, after _Paul D. Hanna_ *)

%o (PARI) {A002620(n)=floor(n/2)*ceil(n/2)}

%o {a(n)=polcoeff(1/(1-x+x*O(x^n)) + sum(m=2,sqrtint(4*n), x^A002620(m+1)/prod(k=1,m,1-x^k+x*O(x^n))),n)}

%o for(n=0,60,print1(a(n),", ")) \\ _Paul D. Hanna_, Jul 06 2013

%Y Cf. A227135 (parts may repeat after even index).

%K nonn

%O 0,3

%A _Joerg Arndt_, Jul 02 2013