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.

Previous Showing 61-70 of 87 results. Next

A099830 Smallest perimeter S such that exactly n distinct Pythagorean triangles with this perimeter can be constructed.

Original entry on oeis.org

12, 60, 120, 240, 420, 720, 1320, 840, 2640, 1680, 3360, 2520, 4620, 7920, 7560, 5040, 10080, 17160, 10920, 9240, 40320, 25200, 28560, 21840, 18480, 60480, 41580, 46200, 36960, 32760, 27720, 78540, 60060, 129360, 134640, 115920, 85680, 65520, 83160
Offset: 1

Views

Author

Hugo Pfoertner, Oct 27 2004

Keywords

Comments

Least perimeter common to exactly n distinct Pythagorean triangles. - Lekraj Beedassy, Jun 07 2006

Examples

			a(7)=1320 because 1320 is the smallest possible perimeter for which exactly 7 different Pythgorean triangles exist: 1320 = 110+600+610 = 120+594+606 = 220+528+572 = 231+520+569 = 264+495+561 = 330+440+550 = 352+420+548.
		

Crossrefs

Cf. A099829 first perimeter producing at least n Pythagorean triangles, A009096 ordered perimeters of Pythagorean triangles, A001399, A069905 partitions into 3 parts.

Extensions

More terms from Ray Chandler, Oct 29 2004

A215521 Number T(n,k) of distinct values of multinomial coefficients M(n;lambda), where lambda ranges over all partitions of n with largest part = k; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 3, 3, 2, 1, 1, 1, 3, 4, 3, 2, 1, 1, 1, 4, 5, 5, 3, 2, 1, 1, 1, 4, 7, 6, 5, 3, 2, 1, 1, 1, 5, 8, 9, 7, 5, 3, 2, 1, 1, 1, 5, 10, 10, 10, 7, 5, 3, 2, 1, 1, 1, 6, 12, 14, 12, 11, 7, 5, 3, 2, 1, 1, 1, 6, 14, 16, 17, 13, 11, 7, 5, 3, 2, 1, 1
Offset: 1

Views

Author

Alois P. Heinz, Aug 14 2012

Keywords

Comments

Differs from A008284 first at T(11,4).

Examples

			T(4,2) = 2 = |{4!/(2!*2!), 4!/(2!*1!*1!)}| = |{6, 12}|.
T(7,4) = 3 = |{35, 105, 210}|.
T(8,3) = 5 = |{560, 1120, 1680, 3360, 6720}|.
T(11,4) = 10 = |{11550, 34650, 46200, 69300, 138600, 207900, 277200, 415800, 831600, 1663200}|.
Triangle T(n,k) begins:
  1;
  1,  1;
  1,  1,  1;
  1,  2,  1,  1;
  1,  2,  2,  1,  1;
  1,  3,  3,  2,  1,  1;
  1,  3,  4,  3,  2,  1,  1;
  1,  4,  5,  5,  3,  2,  1,  1;
  1,  4,  7,  6,  5,  3,  2,  1,  1;
  1,  5,  8,  9,  7,  5,  3,  2,  1,  1;
  1,  5, 10, 10, 10,  7,  5,  3,  2,  1,  1;
  ...
		

Crossrefs

Columns k=1-3 give: A000012 (for n>0), A004526, A069905(n) = A001399(n-3) for n>=3.
T(2*n,n) gives: A070289.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, {1}, `if`(i<1, {},
          {b(n, i-1)[], seq(map(x-> x*i!^j, b(n-i*j, i-1))[], j=1..n/i)}))
        end:
    T:= (n, k)-> nops(b(n-k, min(k, n-k))):
    seq(seq(T(n, k), k=1..n), n=1..15);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {1}, If[i < 1, {}, Join[b[n, i - 1], Table[ b[n - i*j, i - 1] *i!^j, {j, 1, n/i}] // Flatten]] // Union]; T[n_, k_] := Length[b[n, k]]; Table[Table[T[n - k, Min[k, n - k]], {k, 1, n}], {n, 1, 15}] // Flatten (* Jean-François Alcover, Jan 21 2015, after Alois P. Heinz *)

A309513 Number of even parts in the partitions of n into 3 parts.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 5, 4, 7, 8, 12, 12, 18, 18, 24, 24, 31, 32, 41, 40, 49, 50, 60, 60, 72, 72, 84, 84, 97, 98, 113, 112, 127, 128, 144, 144, 162, 162, 180, 180, 199, 200, 221, 220, 241, 242, 264, 264, 288, 288, 312, 312, 337, 338, 365, 364, 391, 392, 420, 420
Offset: 0

Views

Author

Wesley Ivan Hurt, Aug 05 2019

Keywords

Examples

			Figure 1: The partitions of n into 3 parts for n = 3, 4, ...
                                                          1+1+8
                                                   1+1+7  1+2+7
                                                   1+2+6  1+3+6
                                            1+1+6  1+3+5  1+4+5
                                     1+1+5  1+2+5  1+4+4  2+2+6
                              1+1+4  1+2+4  1+3+4  2+2+5  2+3+5
                       1+1+3  1+2+3  1+3+3  2+2+4  2+3+4  2+4+4
         1+1+1  1+1+2  1+2+2  2+2+2  2+2+3  2+3+3  3+3+3  3+3+4    ...
-----------------------------------------------------------------------
  n  |     3      4      5      6      7      8      9     10      ...
-----------------------------------------------------------------------
a(n) |     0      1      2      5      4      7      8     12      ...
-----------------------------------------------------------------------
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[Mod[i - 1, 2] + Mod[j - 1, 2] + Mod[n - i - j - 1, 2], {i, j, Floor[(n - j)/2]}], {j, Floor[n/3]}], {n, 0, 80}]

Formula

a(n) = Sum_{j=1..floor(n/3)} Sum_{i=j..floor((n-j)/2)} (((i-1) mod 2) + ((j-1) mod 2) + ((n-i-j-1) mod 2)). [Corrected by Georg Fischer, Mar 11 2025]
From Colin Barker, Aug 06 2019: (Start)
G.f.: x^4*(1 + x + 3*x^2 - x^3 + 2*x^4) / ((1 - x)^3*(1 + x)^2*(1 - x + x^2)*(1 + x^2)*(1 + x + x^2)).
a(n) = a(n-1) + a(n-4) - a(n-5) + a(n-6) - a(n-7) - a(n-10) + a(n-11) for n>10. (End)
a(n) = 3*A069905(n) - A309511(n). - Ray Chandler, Mar 13 2025

A374702 Number of integer compositions of n whose leaders of maximal weakly decreasing runs sum to 3. Column k = 3 of A374748.

Original entry on oeis.org

0, 0, 0, 2, 3, 6, 9, 13, 17, 23, 28, 35, 42, 50, 58, 68, 77, 88, 99, 111, 123, 137, 150, 165, 180, 196, 212, 230, 247, 266, 285, 305, 325, 347, 368, 391, 414, 438, 462, 488, 513, 540, 567, 595, 623, 653, 682, 713, 744, 776, 808, 842, 875, 910, 945, 981
Offset: 0

Views

Author

Gus Wiseman, Aug 12 2024

Keywords

Comments

The weakly decreasing run-leaders of a sequence are obtained by splitting it into maximal weakly decreasing subsequences and taking the first term of each.

Examples

			The a(0) = 0 through a(8) = 17 compositions:
  .  .  .  (3)   (31)   (32)    (33)     (322)     (332)
           (12)  (112)  (122)   (321)    (331)     (3221)
                 (121)  (311)   (1122)   (1222)    (3311)
                        (1112)  (1221)   (3211)    (11222)
                        (1121)  (3111)   (11122)   (12221)
                        (1211)  (11112)  (11221)   (32111)
                                (11121)  (12211)   (111122)
                                (11211)  (31111)   (111221)
                                (12111)  (111112)  (112211)
                                         (111121)  (122111)
                                         (111211)  (311111)
                                         (112111)  (1111112)
                                         (121111)  (1111121)
                                                   (1111211)
                                                   (1112111)
                                                   (1121111)
                                                   (1211111)
		

Crossrefs

The version for k = 2 is A004526.
The version for partitions is A069905 or A001399 (shifted).
For reversed partitions we appear to have A137719.
For length instead of sum we have A241627.
For leaders of constant runs we have A373952.
The opposite rank statistic is A374630, row-sums of A374629.
The corresponding rank statistic is A374741 row-sums of A374740.
Column k = 3 of A374748.
A003242 counts anti-run compositions.
A011782 counts integer compositions.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Total[First/@Split[#,GreaterEqual]]==3&]],{n,0,15}]
  • PARI
    seq(n)={Vec((2 + x + x^2)/((1 + x + x^2)*(1 + x)*(1 - x)^3) + O(x^(n-2)), -n-1)} \\ Andrew Howroyd, Aug 14 2024

Formula

G.f.: x^3*(2 + x + x^2)/((1 + x + x^2)*(1 + x)*(1 - x)^3). - Andrew Howroyd, Aug 14 2024

Extensions

a(27) onwards from Andrew Howroyd, Aug 14 2024

A242089 Number of triples (a,b,c) with 0 < a < b < c < p and a + b + c == 0 mod p, where p = prime(n).

Original entry on oeis.org

0, 0, 0, 2, 10, 16, 32, 42, 66, 112, 130, 192, 240, 266, 322, 416, 522, 560, 682, 770, 816, 962, 1066, 1232, 1472, 1600, 1666, 1802, 1872, 2016, 2562, 2730, 2992, 3082, 3552, 3650, 3952, 4266, 4482, 4816, 5162, 5280, 5890, 6016, 6272, 6402, 7210, 8066, 8362, 8512
Offset: 1

Views

Author

Jonathan Sondow, Jun 16 2014

Keywords

Comments

a(n) is even. (Proof. Each triple (a,b,c) with b < p/2 pairs uniquely with a triple (a',b',c') = (p-c,p-b,p-a) with b' > p/2.)

Examples

			For prime(4) = 7 there are 2 triples (a,b,c) with 0 < a < b < c < 7 and a + b + c == 0 mod 7, namely, 1+2+4 = 7 and 3+5+6 = 2*7, so a(4) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[ Length[ Reduce[ Mod[a + b + c, Prime[n]] == 0 && 0 < a < b < c < Prime[n], {a, b, c}, Integers]], {n, 40}]
  • PARI
    a(n) = 2 * round((prime(n) - 3)^2/12) \\ David A. Corneth, May 27 2025

Formula

a(n) = 2*A242090(n).
a(n) = 2*A069905(prime(n)-3) = 2 * round((prime(n) - 3)^2/12). - David A. Corneth, May 27 2025

Extensions

a(41)-a(50) from Fausto A. C. Cariboni, Sep 30 2018

A306403 The number of distinct products that can be formed by multiplying the parts of a partition of n into 3 positive parts.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 4, 5, 7, 8, 10, 12, 13, 14, 19, 20, 23, 27, 29, 32, 34, 39, 43, 47, 51, 53, 59, 58, 67, 73, 75, 81, 88, 91, 93, 106, 109, 114, 117, 128, 131, 133, 145, 154, 163, 166, 174, 181, 180, 201, 206, 209, 219, 231, 240, 238, 252, 267, 272, 289, 290, 300, 299, 323, 328, 345, 349, 366, 376
Offset: 0

Views

Author

R. J. Mathar, Feb 13 2019

Keywords

Crossrefs

Row sums of A317578.
Cf. A069905.

Programs

  • Maple
    a:= proc(n) option remember; local m, c, i, j, h, w;
          m, c:= proc() true end, 0; forget(m);
          for i to iquo(n, 3) do for j from i to iquo(n-i, 2) do
            h:= i*j*(n-j-i); w:= m(h);
            if w then m(h):= false; c:= c+1 fi
          od od; c
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, Feb 13 2019
  • Mathematica
    a[n_] := a[n] = Module[{m, c = 0, i, j, h, w}, m[_] = True; For[i = 1, i <= Quotient[n, 3], i++, For[j = i, j <= Quotient[n - i, 2], j++, h = i*j*(n - j - i); w = m[h]; If[w, m[h] = False; c++]]]; c];
    a /@ Range[0, 80] (* Jean-François Alcover, Feb 24 2020, after Alois P. Heinz *)

Formula

a(n) <= A069905(n).

A307018 Total number of parts of size 3 in the partitions of n into parts of size 2 and 3.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 1, 2, 4, 2, 4, 6, 4, 6, 9, 6, 9, 12, 9, 12, 16, 12, 16, 20, 16, 20, 25, 20, 25, 30, 25, 30, 36, 30, 36, 42, 36, 42, 49, 42, 49, 56, 49, 56, 64, 56, 64, 72, 64, 72, 81, 72, 81, 90, 81, 90, 100, 90, 100, 110, 100, 110, 121, 110, 121, 132
Offset: 0

Views

Author

Andrew Ivashenko, Mar 19 2019

Keywords

Crossrefs

Programs

  • GAP
    a:=[0,0,0,1,0,1,2,1];; for n in [9..80] do a[n]:=a[n-2]+2*a[n-3] -2*a[n-5]-a[n-6]+a[n-8]; od; a; # G. C. Greubel, Apr 03 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 80); [0,0,0] cat Coefficients(R!( x^3/((1-x^2)*(1-x^3)^2) )); // G. C. Greubel, Apr 03 2019
    
  • Mathematica
    LinearRecurrence[{0,1,2,0,-2,-1,0,1}, {0,0,0,1,0,1,2,1}, 80] (* G. C. Greubel, Apr 03 2019 *)
    Table[(6n(2+n)-5-27(-1)^n+8(4+3n)Cos[2n Pi/3]-8Sqrt[3]n Sin[2n Pi/3])/216,{n,0,66}] (* Stefano Spezia, Apr 21 2022 *)
  • PARI
    my(x='x+O('x^80)); concat([0,0,0], Vec(x^3/((1-x^2)*(1-x^3)^2))) \\ G. C. Greubel, Apr 03 2019
    
  • Sage
    (x^3/((1-x^2)*(1-x^3)^2)).series(x, 80).coefficients(x, sparse=False) # G. C. Greubel, Apr 03 2019
    

Formula

a(n+2) = A321202(n) - A114209(n+1).
a(3n+1) = A002620(n+2).
a(3n+2) = A002620(n+1).
a(3n+3) = A002620(n+2).
G.f.: x^3/((1+x)*(1+x+x^2)^2*(1-x)^3). - Alois P. Heinz, Mar 19 2019
a(n) = a(n-2) + 2*a(n-3) - 2*a(n-5) - a(n-6) + a(n-8). - G. C. Greubel, Apr 03 2019
a(n) = (6*n*(2 + n) + 8*(4 + 3*n)*cos(2*n*Pi/3) - 8*sqrt(3)*n*sin(2*n*Pi/3) - 5 - 27*(-1)^n)/216. - Stefano Spezia, Apr 21 2022
From Ridouane Oudra, Nov 24 2024: (Start)
a(n) = (7*n/2 - 7*n^2/2 - 9*floor(n/2) + (6*n+4)*floor(2*n/3) + 4*floor(n/3))/18.
a(n) = A008133(n) - A069905(n-1).
a(n) = A002620(A008611(n)). (End)

Extensions

More terms from Alois P. Heinz, Mar 19 2019

A307872 Sum of the smallest parts in the partitions of n into 3 parts.

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 5, 7, 11, 13, 17, 23, 27, 33, 42, 48, 57, 69, 78, 90, 106, 118, 134, 154, 170, 190, 215, 235, 260, 290, 315, 345, 381, 411, 447, 489, 525, 567, 616, 658, 707, 763, 812, 868, 932, 988, 1052, 1124, 1188, 1260, 1341, 1413, 1494, 1584, 1665
Offset: 1

Views

Author

Wesley Ivan Hurt, May 02 2019

Keywords

Examples

			Figure 1: The partitions of n into 3 parts for n = 3, 4, ...
                                                          1+1+8
                                                   1+1+7  1+2+7
                                                   1+2+6  1+3+6
                                            1+1+6  1+3+5  1+4+5
                                     1+1+5  1+2+5  1+4+4  2+2+6
                              1+1+4  1+2+4  1+3+4  2+2+5  2+3+5
                       1+1+3  1+2+3  1+3+3  2+2+4  2+3+4  2+4+4
         1+1+1  1+1+2  1+2+2  2+2+2  2+2+3  2+3+3  3+3+3  3+3+4    ...
-----------------------------------------------------------------------
  n  |     3      4      5      6      7      8      9     10      ...
-----------------------------------------------------------------------
a(n) |     1      1      2      4      5      7     11     13      ...
-----------------------------------------------------------------------
		

Crossrefs

Cf. A069905.

Programs

  • Mathematica
    Table[Sum[Sum[k, {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]
    Table[Total[IntegerPartitions[n,{3}][[;;,-1]]],{n,100}] (* Harvey P. Dale, Jan 14 2024 *)
  • PARI
    a(n) = sum(k=1, n\3, sum(i=k, (n-k)\2, k)); \\ Michel Marcus, May 02 2019

Formula

a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} k.
Conjectures from Colin Barker, May 02 2019: (Start)
G.f.: x^3 / ((1 - x)^4*(1 + x)*(1 + x + x^2)^2).
a(n) = a(n-1) + a(n-2) + a(n-3) - 2*a(n-4) - 2*a(n-5) + a(n-6) + a(n-7) + a(n-8) - a(n-9) for n > 9.
(End)
a(n) = ((-1)^n*(-1+(-1)^r)+2*r*((-1)^(n+r)+(1+r)*(1+2*n-4*r)))/16, where r = floor(n/3). - Wesley Ivan Hurt, Oct 24 2021

A309405 Number of prime parts in the partitions of n into 3 parts.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 5, 7, 8, 12, 12, 16, 17, 21, 22, 29, 29, 34, 35, 41, 42, 50, 50, 58, 59, 67, 68, 77, 78, 86, 87, 96, 97, 108, 108, 119, 120, 130, 131, 144, 144, 155, 156, 168, 169, 182, 183, 197, 198, 212, 213, 228, 228, 242, 243, 258, 259, 275, 275, 291
Offset: 0

Views

Author

Wesley Ivan Hurt, Jul 30 2019

Keywords

Examples

			Figure 1: The partitions of n into 3 parts for n = 3, 4, ...
                                                          1+1+8
                                                   1+1+7  1+2+7
                                                   1+2+6  1+3+6
                                            1+1+6  1+3+5  1+4+5
                                     1+1+5  1+2+5  1+4+4  2+2+6
                              1+1+4  1+2+4  1+3+4  2+2+5  2+3+5
                       1+1+3  1+2+3  1+3+3  2+2+4  2+3+4  2+4+4
         1+1+1  1+1+2  1+2+2  2+2+2  2+2+3  2+3+3  3+3+3  3+3+4    ...
-----------------------------------------------------------------------
  n  |     3      4      5      6      7      8      9     10      ...
-----------------------------------------------------------------------
a(n) |     0      1      3      5      7      8     12     12      ...
-----------------------------------------------------------------------
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(PrimePi[i] - PrimePi[i - 1]) + (PrimePi[j] - PrimePi[j - 1]) + (PrimePi[n - i - j] - PrimePi[n - i - j - 1]), {i, j, Floor[(n - j)/2]}], {j, Floor[n/3]}], {n, 0, 80}]
    Table[Count[Flatten[IntegerPartitions[n,{3}]],?PrimeQ],{n,0,60}] (* _Harvey P. Dale, Jun 13 2025 *)

Formula

a(n) = Sum_{j=1..floor(n/3)} Sum_{i=j..floor((n-j)/2)} (c(i) + c(j) + c(n-i-j)), where c = A010051.

A348536 Number of partitions of n into 3 parts that divide n.

Original entry on oeis.org

0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0, 3, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0, 3, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0, 3, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0, 3, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0, 3, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0, 3, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0, 3, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 21 2021

Keywords

Comments

From David A. Corneth, Oct 08 2022: (Start)
Proof of formula: suppose we have a partition d_1 + d_2 + d_3 = n where 0 < d_1 <= d_2 <= d_3 and d_1 | n, d_2 | n and d_3 | n.
Then let m_i * d_i = n for i in (1, 2, 3).
Dividing d_1 + d_2 + d_3 = n by n gives d_1/n + d_2/n + d_3/n = n/n, i.e., 1/m_1 + 1/m_2 + 1/m_3 = 1. There are 3 solutions to that equation namely (m_1, m_2, m_3) in {(2, 4, 4), (2, 3, 6), (3, 3, 3)}. The lcm of these numbers is 12 so the sequence is periodic with a period of 12 and then calculating the first 12 terms defines the sequence.
Alternative name: number of divisors of n from {3, 4, 6}. (End)

Examples

			a(12) = 3 via 2 + 4 + 6 = 3 + 3 + 6 = 4 + 4 + 4. - _David A. Corneth_, Oct 08 2022
		

Crossrefs

Programs

  • Mathematica
    Block[{c}, c[n_] := 1 - Ceiling[n] + Floor[n]; Array[Sum[Sum[c[#/j]*c[#/i]*c[#/(# - i - j)], {i, j, Floor[(# - j)/2]} ], {j, Floor[#/3]} ] &, 105]] (* Michael De Vlieger, Oct 21 2021 *)
    Table[Count[IntegerPartitions[n,{3}],?(Mod[n,#]=={0,0,0}&)],{n,100}] (* _Harvey P. Dale, Apr 07 2025 *)
  • PARI
    a(n) = [0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0, 3][(n-1)%12 + 1] \\ David A. Corneth, Oct 08 2022
    
  • PARI
    a(n) = { my(d = divisors(n), res = 0); d = d[^#d]; forvec(x = vector(2, i, [1, #d]), s = d[x[1]] + d[x[2]]; if(n - s >= d[x[2]], if(n % (n - s) == 0, print([d[x[1]], d[x[2]], n-s]); res++ ) ) , 1 ); res } \\ David A. Corneth, Oct 08 2022

Formula

a(n) = Sum_{j=1..floor(n/3)} Sum_{i=j..floor((n-j)/2)} c(n/j) * c(n/i) * c(n/(n-i-j)), where c(n) = 1 - ceiling(n) + floor(n).
a(n + 12) = a(n) where n >= 1. - David A. Corneth, Oct 08 2022
Previous Showing 61-70 of 87 results. Next