A056837 Duplicate of A001971.
0, 0, 1, 1, 2, 3, 5, 6, 8, 10, 13, 15, 18, 21, 25, 28, 32, 36, 41, 45, 50, 55, 61, 66, 72, 78
Offset: 0
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.
G.f. = 1 + 2*x + 4*x^2 + 7*x^3 + 11*x^4 + 16*x^5 + 23*x^6 + 31*x^7 + ... From _John M. Campbell_, Feb 03 2016: (Start) For example, letting n=6, there are a(n-3)=a(3)=7 partitions mu of 12 of length 4 such mu has an even number of even entries and the transpose of mu has an even number of even entries: (8,2,1,1), (6,4,1,1), (6,3,2,1), (6,2,2,2), (4,4,3,1), (4,4,2,2), (4,3,3,2). For example, the partition oooooo ooo oo o has 2 even entries and the transpose oooo ooo oo o o o has an even number of even entries. (End)
K:=Rationals(); M:=MatrixAlgebra(K,4); q1:=DiagonalMatrix(M,[1,-1,1,-1]); p1:=DiagonalMatrix(M,[1,1,-1,-1]); q2:=DiagonalMatrix(M,[1,1,1,-1]); h:=M![1,1,1,1, 1,1,-1,-1, 1,-1,1,-1, 1,-1,-1,1]/2; U:=MatrixGroup<4,K|q2,h>; G:=MatrixGroup<4,K|q1,q2,h>; H:=MatrixGroup<4,K|q1,q2,h,p1>; MolienSeries(U);
A000601:=1/(z+1)/(z**2+z+1)/(z-1)**4; # Simon Plouffe in his 1992 dissertation with(combstruct):ZL:=[st, {st=Prod(left, right), left=Set(U, card=r+1), right=Set(U, card=1)}, unlabeled]: subs(r=2, stack): seq(count(subs(r=2, ZL), size=m), m=3..52) ; # Zerinvary Lajos, Feb 07 2008
CoefficientList[Series[1/((1-x)^2*(1-x^2)*(1-x^3)), {x, 0, 49}], x] (* Jean-François Alcover, Jul 20 2011 *) LinearRecurrence[{2,0,-1,-1,0,2,-1},{1,2,4,7,11,16,23},50] (* Harvey P. Dale, Mar 17 2013 *) a[ n_] := Quotient[ 2 n^3 + 21 n^2 + 66 n, 72] + 1; (* Michael Somos, May 28 2014 *)
Vec(1/((1-x)^2*(1-x^2)*(1-x^3))+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
{a(n) = (2*n^3 + 21*n^2 + 66*n) \ 72 + 1}; /* Michael Somos, May 28 2014 */
Consider the number 13. The following partitions give a nondegenerate triangle: 4 4 5; 3 5 5; 1 6 6; 2 5 6; 3 4 6. Since the first three partitions represent isosceles triangles, we have A059169(13) = 3. G.f. = x^3 + x^5 + x^6 + 2*x^7 + x^8 + 2*x^9 + 2*x^10 + 3*x^11 + 2*x^12 + ...
a059169 n = a059169_list !! (n-1) a059169_list = map abs $ zipWith (-) (tail a178804_list) a178804_list -- Reinhard Zumkeller, Nov 15 2014
[Floor((n-1)/2) - Floor(n/4): n in [1..80]]; // G. C. Greubel, Mar 08 2018
a[1] := 0: a[2] := 0: a[3] := 1: a[4] := 0: a[5] := 1: for n from 6 to 300 do a[n] := a[n-1] + a[n-4] - a[n-5]: end do: seq(a[n], n=1..82); a := n -> A005044(n) - A005044(n-6): A005044 := n-> floor((1/48)*(n^2 + 3*n + 21 + (-1)^(n-1)*3*n)): seq(a(n), n = 1..82); # Johannes W. Meijer, Oct 10 2013
CoefficientList[Series[x^2 (1 - x + x^2)/(1 - x - x^4 + x^5), {x, 0, 100}], x] (* Vincenzo Librandi, Aug 15 2013 *) LinearRecurrence[{1,0,0,1,-1},{0,0,1,0,1},100] (* Harvey P. Dale, Feb 09 2015 *) a[ n_] := Quotient[ n - 1, 2] - Quotient[ n, 4]; (* Michael Somos, May 05 2015 *)
{a(n) = (n - 1) \ 2 - (n \ 4)}; /* Michael Somos, Oct 14 2008 */
{a(n) = if( n<1, -a(3 - n), polcoeff( x^3 * (1 - x + x^2) / (1 - x - x^4 + x^5) + x * O(x^n), n))}; /* Michael Somos, Oct 14 2008 */
[Floor((n+3)^2/8): n in [0..60]]; // Vincenzo Librandi, Aug 15 2011
A001972:=-(2-z+z**3-2*z**4+z**5)/(z+1)/(z**2+1)/(z-1)**3; # conjectured by Simon Plouffe in his 1992 dissertation; gives sequence except for the initial 1
CoefficientList[Series[1/((1-x)^2(1-x^4)),{x,0,80}],x] (* Harvey P. Dale, Mar 27 2011 *)
a(n)=(n+3)^2\8;
Rows start: 1, 1, 1, 1, 1, 1, ...; 1, 1, 1, 1, 1, 1, ...; 1, 1, 2, 2, 3, 3, ...; 1, 1, 2, 3, 5, 6, ...; 1, 1, 3, 5, 8, 12, ...; etc. T(4,5)=12 since 10 can be partitioned into 5+5, 5+4+1, 5+3+2, 5+3+1+1, 5+2+2+1, 4+4+2, 4+3+3, 4+4+1+1, 4+3+2+1, 4+2+2+2, 3+3+3+1, and 3+3+2+2.
A067059 := proc(n,k) local m,a1,a2 ; a1 := 0 ; m := floor(n*k/2) ; for L in combinat[partition](m) do if nops(L) <= n then if max(op(L)) <= k then a1 := a1+1 ; end if ; end if; end do: a2 := 0 ; m := ceil(n*k/2) ; for L in combinat[partition](m) do if nops(L) <= n then if max(op(L)) <= k then a2 := a2+1 ; end if ; end if; end do: max(a1,a2) ; end proc: for d from 0 to 12 do for k from 0 to d do printf("%d,",A067059(d-k,k)) ; end do: end do: # R. J. Mathar, Nov 13 2016
t[n_, k_] := Length[ IntegerPartitions[ Floor[n*k/2], n, Range[k]]]; Flatten[ Table[ t[n-k , k], {n, 0, 13}, {k, 0, n}]] (* Jean-François Alcover, Jan 02 2012 *)
def A067059(n, k): return Partitions((n*k)//2, max_length=n, max_part=k).cardinality() for n in (0..9): [A067059(n,k) for k in (0..9)] # Peter Luschny, May 05 2014
The second term on the sixth row is 6 because we have 6 solutions: {1+3, 1+5, 2+4, 2+6, 3+5, 4+6} and the third term on the same row is 5 because we have solutions {1+2,1+5,2+4,3+6,4+5}. Triangle begins: 0; 1, 0; 3, 1, 1; 6, 2, 2, 1; 10, 4, 4, 2, 2; 15, 6, 5, 3, 3, 2; 21, 9, 7, 5, 4, 3, 3; 28, 12, 10, 6, 6, 4, 4, 3; 36, 16, 12, 8, 8, 5, 5, 4, 4; 45, 20, 15, 10, 9, 7, 6, 5, 5, 4;
a061857 n k = length [()| i <- [2..n], j <- [1..i-1], mod (i + j) k == 0] a061857_row n = map (a061857 n) [1..n] a061857_tabl = map a061857_row [1..] -- Reinhard Zumkeller, May 08 2012
[seq(DivSumChoose2Triangle(j),j=1..120)]; DivSumChoose2Triangle := (n) -> nops(DivSumChoose2(trinv(n-1),(n-((trinv(n-1)*(trinv(n-1)-1))/2)))); DivSumChoose2 := proc(n,k) local a,i,j; a := []; for i from 1 to (n-1) do for j from (i+1) to n do if(0 = ((i+j) mod k)) then a := [op(a),[i,j]]; fi; od; od; RETURN(a); end;
a[n_, 1] := n*(n-1)/2; a[n_, k_] := Module[{r}, r = Reduce[1 <= i < j <= n && Mod[i + j, k] == 0, {i, j}, Integers]; Which[Head[r] === Or, Length[r], Head[r] === And, 1, r === False, 0, True, Print[r, " not parsed"]]]; Table[a[n, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Mar 04 2014 *)
(define (A061857 n) (A220691bi (A002024 n) (A002260 n))) ;; Antti Karttunen, Feb 18 2013. Needs A220691bi from A220691.
A001973:=(1-z+z**2)/(z+1)/(z**2+z+1)/(z-1)**4; # Simon Plouffe in his 1992 dissertation with(combstruct):ZL:=[st, {st=Prod(left, right), left=Set(U, card=r+1), right=Set(U, card=2)}, unlabeled]: subs(r=2, stack): seq(count(subs(r=2, ZL), size=m), m=6..45) ; # Zerinvary Lajos, Feb 07 2008
CoefficientList[Series[(1+x^3)/((1-x)*(1-x^2)^2*(1-x^3)),{x,0,40}],x] (* Vincenzo Librandi, Jun 11 2012 *)
Vec((1+x^3)/((1-x)*(1-x^2)^2*(1-x^3))+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
LinearRecurrence[{1, 2, -1, -1, -1, -1, 0, 2, 2, 0, -1, -1, -1, -1, 2, 1, -1}, {1, 1, 4, 8, 18, 32, 58, 94, 151, 227, 338, 480, 676, 920, 1242, 1636, 2137}, 100] (* Jean-François Alcover, Feb 25 2020 *)
f=1/((1-z)*(1-x*z)*(1-x^2*z)*(1-x^3*z)*(1-x^4*z)*(1-x^5*z)*(1-x^6*z)); n=200; p=subst(subst(f,x,x+x*O(x^n)),z,z+z*O(z^n)); for(n=0,60,print1(polcoeff(polcoeff(p,3*n),n)",")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), Feb 16 2008
a(3)=13 since partitions of 12 into up to 8 parts each no more than 3 are 3+3+3+3 = 3+3+3+2+1 = 3+3+3+1+1+1 = 3+3+2+2+2 = 3+3+2+2+1+1 = 3+3+2+1+1+1+1 = 3+3+1+1+1+1+1+1 = 3+2+2+2+2+1 = 3+2+2+2+1+1+1 = 3+2+2+1+1+1+1+1 = 2+2+2+2+2+2 = 2+2+2+2+2+1+1 = 2+2+2+2+1+1+1+1; or equivalently partitions of 15 into exactly 3 single-digit numbers are 9+5+1 = 9+4+2 = 9+3+3 = 8+6+1 = 8+5+2 = 8+4+3 = 7+7+1 = 7+6+2 = 7+5+3 = 7+4+4 = 6+6+3 = 6+5+4 =5+5+5.
a:= n-> subs({x=1}, convert(series((product('1-x^i', 'i'=9..8+n)/ product('1-x^k', 'k'=2..n)), x, 4*n+1), polynom)): seq (a(n), n=0..40); # Leonid Bedratyuk, Dec 06 2006
a[n_] := Length[IntegerPartitions[4*n, 8, Range[n]]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 17 2014 *)
The table a(p,w) = [q^w][p+3,3]_q starts: p\w 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ... 0: 1 1: 1 1 1 1 2: 1 1 2 2 2 1 1 3: 1 1 2 3 3 3 3 2 1 1 4: 1 1 2 3 4 4 5 4 4 3 2 1 1 5: 1 1 2 3 4 5 6 6 6 6 5 4 3 2 1 1 6: 1 1 2 3 4 5 7 7 8 8 8 7 7 5 4 3 2 1 1 ... Reformatted and extended by _Wolfdieter Lang_, Dec 04 2012 Partition example: Row p=2 is 1 1 2 2 2 1 1 because there are ten solution for (m_0, m_1, m_2, m_3) of the first equation given in a comment above, namely (2,0,0,0), (0,2,0,0), (0,0,2,0), (0,0,0,2), (1,1,0,0), (1,0,1,0), (1,0,0,1), (0,1,1,0), (0,1,0,1) and (0,0,1,1) which have the w = 1*m_1 + 2*m_2 + 3*m_3 values 0, 2, 4, 6, 1, 2, 3, 3, 4 and 5, respectively. Therefore there are 1, 1, 2, 2, 2, 1, 1 solutions for w = 0, 1, 2, 3, 4, 5, 6, respectively. - _Wolfdieter Lang_, Dec 03 2012 a(4,5) = 4 because there are 4 partitions of 5 with 1, 2, 3 or 4 parts, each being <= 3, namely all partitions of 5 excluding 5, 14 and 11111. There are also 4 partitions of 5 with 1, 2, or 3 parts, each being <= 4, namely all partitions of 5 excluding 5, 1112 and 11111. - _Wolfdieter Lang_, Dec 04 2012 The table may also be arranged as follows (see the Alford Arnold comment above): 1 ..1 ..1..1 ..1..1..1 ..1..2..1..1 .....2..2..1..1 .....2..3..2..1..1 .....1..3..3..2..1..1
nmax = 6; se = Series[ 1/Product[1 - q^k*x, {k, 0, 3}], {x, 0, nmax}]; row[n_] := CoefficientList[ SeriesCoefficient[se, n], q]; Flatten[ Table[ row[n], {n, 0, nmax}]] (* Jean-François Alcover, Dec 19 2011 *)
Comments