A182722 a(n) = A005291(n+1)-A182712(n).
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 5, 10, 14, 26, 36, 60, 83, 128, 175, 261, 351, 504, 674, 943, 1247, 1711, 2243
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.
Triangle begins: [1]; [2],[1]; [3],[1],[1]; [4],[2,2],[1],[1],[1]; [5],[3,2],[1],[1],[1],[1],[1]; [6],[3,3],[4,2],[2,2,2],[1],[1],[1],[1],[1],[1],[1]; [7],[4,3],[5,2],[3,2,2],[1],[1],[1],[1],[1],[1],[1],[1],[1],[1],[1]; ... The illustration of the three views of the section model of partitions (version "tree" with seven sections) shows the connection between several sequences. --------------------------------------------------------- Partitions A194805 Table 1.0 . of 7 p(n) A194551 A135010 --------------------------------------------------------- 7 15 7 7 . . . . . . 4+3 4 4 . . . 3 . . 5+2 5 5 . . . . 2 . 3+2+2 3 3 . . 2 . 2 . 6+1 11 6 1 6 . . . . . 1 3+3+1 3 1 3 . . 3 . . 1 4+2+1 4 1 4 . . . 2 . 1 2+2+2+1 2 1 2 . 2 . 2 . 1 5+1+1 7 1 5 5 . . . . 1 1 3+2+1+1 1 3 3 . . 2 . 1 1 4+1+1+1 5 4 1 4 . . . 1 1 1 2+2+1+1+1 2 1 2 . 2 . 1 1 1 3+1+1+1+1 3 1 3 3 . . 1 1 1 1 2+1+1+1+1+1 2 2 1 2 . 1 1 1 1 1 1+1+1+1+1+1+1 1 1 1 1 1 1 1 1 1 . 1 --------------- . *<------- A000041 -------> 1 1 2 3 5 7 11 . A182712 -------> 1 0 2 1 4 3 . A182713 -------> 1 0 1 2 2 . A182714 -------> 1 0 1 1 . 1 0 1 . A141285 A182703 1 0 . A182730 A182731 1 --------------------------------------------------------- . A138137 --> 1 2 3 6 9 15.. --------------------------------------------------------- . A182746 <--- 4 . 2 1 0 1 2 . 4 ---> A182747 --------------------------------------------------------- . . A182732 <--- 6 3 4 2 1 3 5 4 7 ---> A182733 . . . . . 1 . . . . . . . . 2 1 . . . . . . 3 . . 1 2 . . . . Table 2.0 . . 2 2 1 . . 3 . Table 2.1 . . . . . 1 2 2 . . . 1 . . . . . . A182982 A182742 A194803 A182983 A182743 . A182992 A182994 A194804 A182993 A182995 --------------------------------------------------------- . From _Omar E. Pol_, Sep 03 2013: (Start) Illustration of initial terms (n = 1..6). The table shows the six sections of the set of partitions of 6. Note that before the dissection the set of partitions was in the ordering mentioned in A026792. More generally, the six sections of the set of partitions of 6 also can be interpreted as the first six sections of the set of partitions of any integer >= 6. Illustration of initial terms: --------------------------------------- n j Diagram Parts --------------------------------------- . _ 1 1 |_| 1; . _ _ 2 1 |_ | 2, 2 2 |_| . 1; . _ _ _ 3 1 |_ _ | 3, 3 2 | | . 1, 3 3 |_| . . 1; . _ _ _ _ 4 1 |_ _ | 4, 4 2 |_ _|_ | 2, 2, 4 3 | | . 1, 4 4 | | . . 1, 4 5 |_| . . . 1; . _ _ _ _ _ 5 1 |_ _ _ | 5, 5 2 |_ _ _|_ | 3, 2, 5 3 | | . 1, 5 4 | | . . 1, 5 5 | | . . 1, 5 6 | | . . . 1, 5 7 |_| . . . . 1; . _ _ _ _ _ _ 6 1 |_ _ _ | 6, 6 2 |_ _ _|_ | 3, 3, 6 3 |_ _ | | 4, 2, 6 4 |_ _|_ _|_ | 2, 2, 2, 6 5 | | . 1, 6 6 | | . . 1, 6 7 | | . . 1, 6 8 | | . . . 1, 6 9 | | . . . 1, 6 10 | | . . . . 1, 6 11 |_| . . . . . 1; ... (End)
less[run1_, run2_] := (lg1 = run1 // Length; lg2 = run2 // Length; lg = Max[lg1, lg2]; r1 = If[lg1 == lg, run1, PadRight[run1, lg, 0]]; r2 = If[lg2 == lg, run2, PadRight[run2, lg, 0]]; Order[r1, r2] != -1); row[n_] := Join[Array[1 &, {PartitionsP[n - 1]}], Sort[Reverse /@ Select[IntegerPartitions[n], FreeQ[#, 1] &], less]] // Flatten // Reverse; Table[row[n], {n, 1, 9}] // Flatten (* Jean-François Alcover, Jan 15 2013 *) Table[Reverse/@Reverse@DeleteCases[Sort@PadRight[Reverse/@Cases[IntegerPartitions[n], x_ /; Last[x]!=1]], x_ /; x==0, 2]~Join~ConstantArray[{1}, PartitionsP[n - 1]], {n, 1, 9}] // Flatten (* Robert Price, May 11 2020 *)
Illustration of three arrangements of the last section of the set of partitions of 7, or more generally the 7th section of the set of partitions of any integer >= 7: . _ _ _ _ _ _ _ . (7) (7) |_ _ _ _ | . (4+3) (4+3) |_ _ _ _|_ | . (5+2) (5+2) |_ _ _ | | . (3+2+2) (3+2+2) |_ _ _|_ _|_ | . (1) (1) | | . (1) (1) | | . (1) (1) | | . (1) (1) | | . (1) (1) | | . (1) (1) | | . (1) (1) | | . (1) (1) | | . (1) (1) | | . (1) (1) | | . (1) (1) |_| . ---------------- . 19,8,5,3,2,1,1 --> Row 7 of triangle A207031. . |/|/|/|/|/|/| . 11,3,2,1,1,0,1 --> Row 7 of this triangle. . Note that the "head" of the last section is formed by the partitions of 7 that do not contain 1 as a part. The "tail" is formed by A000041(7-1) parts of size 1. The number of rows (or zones) is A000041(7) = 15. The last section of the set of partitions of 7 contains eleven 1's, three 2's, two 3's, one 4, one 5, there are no 6's and it contains one 7. So, for k = 1..7, row 7 gives: 11, 3, 2, 1, 1, 0, 1. Triangle begins: 1; 1, 1; 2, 0, 1; 3, 2, 0, 1; 5, 1, 1, 0, 1; 7, 4, 2, 1, 0, 1; 11, 3, 2, 1, 1, 0, 1; 15, 8, 3, 3, 1, 1, 0, 1; 22, 7, 6, 2, 2, 1, 1, 0, 1; 30, 15, 6, 5, 3, 2, 1, 1, 0, 1; 42, 15, 10, 5, 4, 2, 2, 1, 1, 0, 1; 56, 27, 14, 10, 5, 5, 2, 2, 1, 1, 0, 1; ...
p:= (f, g)-> zip((x, y)-> x+y, f, g, 0): b:= proc(n,i) option remember; local g; if n=0 then [1] elif n<2 or i<2 then [0] else g:= `if`(i>n, [0], b(n-i, i)); p(p([0$j=2..i, g[1]], b(n, i-1)), g) fi end: h:= proc(n) option remember; `if`(n=0, 1, b(n, n)[1]+h(n-1)) end: T:= proc(n) h(n-1), b(n, n)[2..n][] end: seq(T(n), n=1..20); # Alois P. Heinz, Feb 19 2012
p[f_, g_] := Plus @@ PadRight[{f, g}]; b[n_, i_] := b[n, i] = Module[{g}, Which[n == 0, {1}, n<2 || i<2, {0}, True, g = If [i>n, {0}, b[n-i, i]]; p[p[Append[Array[0&, i-1], g[[1]]], b[n, i-1]], g]]]; h[n_] := h[n] = If[n == 0, 1, b[n, n][[1]] + h[n-1]]; t[n_] := {h[n-1], Sequence @@ b[n, n][[2 ;; n]]}; Table[t[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Jan 16 2014, after Alois P. Heinz's Maple code *) Table[{PartitionsP[n-1]}~Join~Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], k], {k,2,n}], {n,1,12}] // Flatten (* Robert Price, May 15 2020 *)
Array begins: . 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... . 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... . 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,... . 3, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,... . 5, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,... . 7, 4, 2, 1, 0, 1, 0, 0, 0, 0, 0, 0,... . 11, 3, 2, 1, 1, 0, 1, 0, 0, 0, 0, 0,... . 15, 8, 3, 3, 1, 1, 0, 1, 0, 0, 0, 0,... . 22, 7, 6, 2, 2, 1, 1, 0, 1, 0, 0, 0,... . 30, 15, 6, 5, 3, 2, 1, 1, 0, 1, 0, 0,... . 42, 15, 10, 5, 4, 2, 2, 1, 1, 0, 1, 0,... . 56, 27, 14, 10, 5, 5, 2, 2, 1, 1, 0, 1,... ... For n = 7, from the conjecture we have that p(n-1) = p(6) = 11 = 3+8 = 2+3+6 = 1+3+2+5 = 1+1+2+3+4 = 0+1+1+2+2+5, etc. where p(n) = A000041(n).
a(8) = 3 counts the 4's in 8 = 4+4 = 4+2+2. The 4's in 8 = 4+3+1 = 4+2+1+1 = 4+1+1+1+1 do not count. From _Omar E. Pol_, Oct 25 2012: (Start) -------------------------------------- Last section Number of the set of of partitions of 8 4's -------------------------------------- 8 .............................. 0 4 + 4 .......................... 2 5 + 3 .......................... 0 6 + 2 .......................... 0 3 + 3 + 2 ...................... 0 4 + 2 + 2 ...................... 1 2 + 2 + 2 + 2 .................. 0 . 1 .......................... 0 . 1 ...................... 0 . 1 ...................... 0 . 1 .................. 0 . 1 ...................... 0 . 1 .................. 0 . 1 .................. 0 . 1 .............. 0 . 1 .................. 0 . 1 .............. 0 . 1 .............. 0 . 1 .......... 0 . 1 .......... 0 . 1 ...... 0 . 1 .. 0 ------------------------------------ . 6 - 3 = 3 . In the last section of the set of partitions of 8 the difference between the sum of the fourth column and the sum of the fifth column is 6 - 3 = 3 equaling the number of 4's, so a(8) = 3 (see also A024788). (End)
b:= proc(n, i) option remember; local g, h; if n=0 then [1, 0] elif i<2 then [0, 0] else g:= b(n, i-1); h:= `if`(i>n, [0, 0], b(n-i, i)); [g[1]+h[1], g[2]+h[2]+`if`(i=4, h[1], 0)] fi end: a:= n-> b(n, n)[2]: seq (a(n), n=1..70); # Alois P. Heinz, Mar 19 2012
z = 60; f[n_] := f[n] = IntegerPartitions[n]; t1 = Table[Count[f[n], p_ /; Count[p, 1] < Count[p, 3]], {n, 0, z}] (* Clark Kimberling, Apr 01 2014 *) b[n_, i_] := b[n, i] = Module[{g, h}, If[n==0, {1, 0}, If[i<2, {0, 0}, g = b[n, i-1]; h = If[i>n, {0, 0}, b[n-i, i]]; {g[[1]] + h[[1]], g[[2]] + h[[2]] + If[i==4, h[[1]], 0]}]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Sep 21 2015, after Alois P. Heinz *) Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 4], {n, 52}] (* Robert Price, May 15 2020 *)
A182714 = lambda n: sum(list(p).count(4) for p in Partitions(n) if 1 not in p)
Triangle begins: 2, 0, 2, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, ... For k = 1 and m = 1; T(1,1) = 2 because there are two parts of size 1 in the last section of the set of partitions of 3, since 2 + m = 3, so a(1) = 2. For k = 2 and m = 1; T(2,1) = 0 because there are no parts of size 2 in the last section of the set of partitions of 3, since 2 + m = 3, so a(2) = 0.
Written as a triangle: 1; 2,1; 3,1,1; 4,2,2,1,1,1; 5,3,2,1,1,1,1,1; 6,4,3,3,2,2,2,2,1,1,1,1,1,1,1; 7,5,4,3,3,2,2,2,1,1,1,1,1,1,1,1,1,1,1; 8,6,5,4,4,4,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
a(3)=1 because P(3)=3, P(2 1)=1 and P(1 1 1)=0.
Rest[ CoefficientList[ Series[x + 1/(1 + x) Product[1/(1 - x^n), {n, 50}], {x, 0, 50}], x]] (* Robert G. Wilson v, Feb 11 2005 *)
a(7) = 2 counts the 3's in 7 = 4+3 = 3+2+2. The 3's in 7 = 3+3+1 = 3+2+1+1 = 3+1+1+1+1 do not count. From _Omar E. Pol_, Oct 27 2012: (Start) -------------------------------------- Last section Number of the set of of partitions of 7 3's -------------------------------------- 7 .............................. 0 4 + 3 .......................... 1 5 + 2 .......................... 0 3 + 2 + 2 ...................... 1 . 1 .......................... 0 . 1 ...................... 0 . 1 ...................... 0 . 1 .................. 0 . 1 ...................... 0 . 1 .................. 0 . 1 .................. 0 . 1 .............. 0 . 1 .............. 0 . 1 .......... 0 . 1 ...... 0 ------------------------------------ . 5 - 3 = 2 . In the last section of the set of partitions of 7 the difference between the sum of the third column and the sum of the fourth column is 5 - 3 = 2 equaling the number of 3's, so a(7) = 2 (see also A024787). (End)
b:= proc(n, i) option remember; local g, h; if n=0 then [1, 0] elif i<2 then [0, 0] else g:= b(n, i-1); h:= `if`(i>n, [0, 0], b(n-i, i)); [g[1]+h[1], g[2]+h[2]+`if`(i=3, h[1], 0)] fi end: a:= n-> b(n, n)[2]: seq(a(n), n=1..70); # Alois P. Heinz, Mar 18 2012
z = 60; f[n_] := f[n] = IntegerPartitions[n]; t1 = Table[Count[f[n], p_ /; Count[p, 1] < Count[p, 2]], {n, 0, z}] (* Clark Kimberling, Mar 31 2014 *) b[n_, i_] := b[n, i] = Module[{g, h}, If[n == 0, {1, 0}, If[i<2, {0, 0}, g = b[n, i-1]; h = If[i>n, {0, 0}, b[n-i, i]]; Join[g[[1]] + h[[1]], g[[2]] + h[[2]] + If[i == 3, h[[1]], 0]]]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Nov 30 2015, after Alois P. Heinz *) Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 3], {n, 51}] (* Robert Price, May 15 2020 *)
A182713 = lambda n: sum(list(p).count(3) for p in Partitions(n) if 1 not in p) # D. S. McNeil, Nov 29 2010
G3(1); # Using the code in A005290. - Sean A. Irvine, Apr 30 2016
Comments