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 21-30 of 33 results. Next

A216665 Triangular array read by rows: T(n,k) is the number of partitions of n into k parts of 2 different sizes; n>=3, 2<=k<=n-1.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 3, 3, 2, 2, 1, 3, 3, 2, 2, 2, 1, 4, 3, 2, 3, 2, 2, 1, 4, 4, 5, 1, 3, 2, 2, 1, 5, 5, 3, 4, 2, 3, 2, 2, 1, 5, 4, 4, 3, 3, 2, 3, 2, 2, 1, 6, 6, 4, 5, 2, 4, 2, 3, 2, 2, 1, 6, 6, 7, 5, 5, 1, 4, 2, 3, 2, 2, 1, 7, 6, 4, 3, 4, 4, 2, 4, 2, 3, 2, 2, 1
Offset: 3

Views

Author

Geoffrey Critzer, Sep 13 2012

Keywords

Comments

Row sums = A002133.
First column (corresponding to k=2) = floor( (n-1)/2 ).

Examples

			T(8,3) = 3 because we have: 6+1+1, 4+2+2, 3+3+2.
Triangle indexed from n=3 and k=2:
1;
1, 1;
2, 2, 1;
2, 1, 2, 1;
3, 3, 2, 2, 1;
3, 3, 2, 2, 2, 1;
4, 3, 2, 3, 2, 2, 1;
4, 4, 5, 1, 3, 2, 2, 1;
		

Crossrefs

Programs

  • Mathematica
    nn=15;ss=Sum[Sum[y^2 x^(i+j)/(1-y x^i)/(1-y x^j),{j,1,i-1}],{i,1,nn}]; f[list_]:=Select[list,#>0&];Map[f,CoefficientList[Series[ss,{x,0,nn}], {x,y}]]//Flatten

Formula

G.f.: Sum_{i>=1} Sum_{j=1..n-1} y^2*x^(i+j)/((1-y*x^j)*(1-y*x^i)).

A274108 Number of partitions of n into parts with exactly two different sizes, the sizes being relatively prime.

Original entry on oeis.org

0, 0, 1, 2, 5, 5, 11, 11, 16, 17, 27, 21, 37, 33, 38, 42, 59, 46, 71, 57, 70, 75, 97, 72, 104, 99, 109, 103, 141, 102, 157, 133, 148, 153, 166, 140, 207, 183, 192, 174, 241, 180, 259, 215, 223, 247, 295, 219, 300, 260, 292, 279, 353, 275, 336, 300, 346, 351
Offset: 1

Views

Author

N. J. A. Sloane, Jun 17 2016

Keywords

Examples

			Explanation of a(3)-a(6):
n=3: 21
n=4: 31, 211
n=5: 41, 32, 311, 221, 2111
n=6: 51, 411, 3111, 2211, 21111
		

Crossrefs

Row sums of triangle in A274109.

Programs

  • PARI
    seq(n)={my(v=Vec(sum(k=1, n-1, numdiv(k)*x^k, O(x^n))^2, -n), u=vector(n, n, moebius(n))); dirmul(u, vector(#v, n, v[n]+numdiv(n)-sigma(n))/2)} \\ Andrew Howroyd, Nov 10 2024
    
  • Python
    from math import gcd
    from sympy import divisors
    def A274108(n): return sum(1 for ax in range(1,n-1) for a in divisors(ax,generator=True) for b in divisors(n-ax,generator=True) if aChai Wah Wu, Dec 11 2024

Formula

Moebius transform of A002133. - Andrew Howroyd, Nov 10 2024

Extensions

More terms from Alois P. Heinz, Jun 23 2016

A367588 Number of integer partitions of n with exactly two distinct parts, both appearing with the same multiplicity.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 3, 4, 5, 6, 5, 9, 6, 9, 10, 11, 8, 15, 9, 16, 14, 15, 11, 23, 14, 18, 18, 23, 14, 30, 15, 26, 22, 24, 22, 38, 18, 27, 26, 38, 20, 42, 21, 37, 36, 33, 23, 53, 27, 42, 34, 44, 26, 54, 34, 53, 38, 42, 29, 74, 30, 45, 49, 57, 40, 66, 33, 58, 46
Offset: 0

Author

Gus Wiseman, Dec 01 2023

Keywords

Comments

The Heinz numbers of these partitions are given by A268390.

Examples

			The a(3) = 1 through a(12) = 9 partitions (A = 10, B = 11):
  (21)  (31)  (32)  (42)    (43)  (53)    (54)      (64)    (65)  (75)
              (41)  (51)    (52)  (62)    (63)      (73)    (74)  (84)
                    (2211)  (61)  (71)    (72)      (82)    (83)  (93)
                                  (3311)  (81)      (91)    (92)  (A2)
                                          (222111)  (3322)  (A1)  (B1)
                                                    (4411)        (4422)
                                                                  (5511)
                                                                  (333111)
                                                                  (22221111)
		

Crossrefs

For any multiplicities we have A002133, ranks A007774.
For any number of distinct parts we have A047966, ranks A072774.
For distinct multiplicities we have A182473, ranks A367589.
These partitions have ranks A268390.
A000041 counts integer partitions, strict A000009.
A072233 counts partitions by number of parts.
A116608 counts partitions by number of distinct parts.

Programs

  • Mathematica
    Table[Sum[Floor[(d-1)/2],{d,Divisors[n]}],{n,30}]

Formula

G.f.: Sum_{i, j>0} x^(j*(2*i+1))/(1-x^j). - John Tyler Rascoe, Feb 04 2024

A092306 Number of partitions of n such that the set of parts has an even number of elements.

Original entry on oeis.org

1, 0, 0, 1, 2, 5, 6, 11, 13, 17, 23, 29, 34, 47, 64, 74, 107, 136, 185, 233, 308, 392, 518, 637, 814, 1002, 1272, 1560, 1912, 2339, 2863, 3475, 4212, 5123, 6147, 7398, 8935, 10734, 12843, 15464, 18382, 22041, 26249, 31326, 37213, 44273, 52375, 62103, 73376
Offset: 0

Author

Vladeta Jovovic, Feb 12 2004

Keywords

Examples

			The partitions of five are: {{5}, {4, 1}, {3, 2}, {3, 1, 1}, {2, 2, 1}, {2, 1, 1, 1}, {1, 1, 1, 1, 1}}, The seven partitions have 1, 2, 2, 2, 2, 2 and 1 distinct parts respectively.
n=6 has A000041(6)=11 partitions: 6, 5+1, 4+2, 4+1+1, 3+3, 3+2+1, 3+1+1+1, 2+2+2, 2+2+1+1, 2+1+1+1+1 and 1+1+1+1+1+1 with partition sets: {6}, {1,5}, {2,4}, {1,4}, {3}, {1,2,3}, {1,3}, {2}, {1,2}, {1,2} and {1}, six of them have an even number of elements, therefore a(6)=6.
		

Crossrefs

Programs

  • Haskell
    import Data.List (group)
    a092306 = length . filter even . map (length . group) . ps 1 where
       ps x 0 = [[]]
       ps x y = [t:ts | t <- [x..y], ts <- ps t (y - t)]
    -- Reinhard Zumkeller, Dec 19 2013
  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, t, `if`(i<1, 0,
           b(n, i-1, t) +add(b(n-i*j, i-1, 1-t), j=1..n/i)))
        end:
    a:= n-> b(n, n, 1):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jan 29 2014
  • Mathematica
    f[n_] := Count[ Mod[ Length /@ Union /@ IntegerPartitions[n], 2], 0]; Table[ f[n], {n, 0, 49}] (* Robert G. Wilson v, Feb 16 2004, updated by Jean-François Alcover, Jan 29 2014 *)

Formula

a(n) = b(n, 1, 0, 1) with b(n, i, j, f) = if iReinhard Zumkeller, Feb 19 2004
G.f.: F(x)*G(x)/2, where F(x) = 1+Product(1-2*x^i, i=1..infinity) and G(x) = 1/Product(1-x^i, i=1..infinity).
a(n) = (A000041(n)+A104575(n))/2.
G.f. A(x) equals the main diagonal entries in the 2 X 2 matrix Product_{n >= 1} [1, x^n/(1 - x^n); x^n/(1 - x^n), 1] = [A(x), B(x); B(x), A(x)], where B(x) is the g.f. of A090794. - Peter Bala, Feb 10 2021

Extensions

More terms from Robert G. Wilson v, Feb 16 2004

A191832 Number of solutions to the Diophantine equation x1*x2 + x2*x3 + x3*x4 + x4*x5 + x5*x6 = n, with all xi >= 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 7, 10, 22, 29, 51, 61, 99, 115, 163, 192, 262, 287, 385, 428, 528, 600, 730, 780, 963, 1054, 1202, 1337, 1545, 1646, 1908, 2059, 2269, 2516, 2770, 2933, 3298, 3568, 3792, 4142, 4493, 4786, 5183, 5562, 5831, 6423, 6745, 7140, 7639, 8231, 8479, 9216, 9603, 10260, 10663, 11488, 11752, 12838, 13100, 13887
Offset: 1

Author

N. J. A. Sloane, Jun 17 2011

Keywords

Comments

Related to "Liouville's Last Theorem".

Programs

  • Maple
    with(numtheory);
    D00:=n->add(tau(j)*tau(n-j),j=1..n-1);
    D01:=n->add(tau(j)*sigma(n-j),j=1..n-1);
    D000:=proc(n) local t1,i,j;
    t1:=0;
    for i from 1 to n-1 do
    for j from 1 to n-1 do
    if (i+j < n) then t1 := t1+numtheory:-tau(i)*numtheory:-tau(j)*numtheory:-tau(n-i-j); fi;
    od; od;
    t1;
    end;
    L5:=n->D000(n)/6+D00(n)+D01(n)/2+(2*n-1/6)*tau(n)-11*sigma[2](n)/6;
    [seq(L5(n),n=1..60)];
    # Alternate:
    g:= proc(n,k,j) option remember;
         if n < k-1 then 0
         elif k = 2 then
            if n mod j = 0 then 1 else 0 fi
         else
            add(procname(n-j*x,k-1,x), x=1 .. floor((n-k+2)/j))
         fi
    end proc:
    f:= n -> add(g(n,6,j),j=1..n-4);
    seq(f(n),n=1..100); # Robert Israel, Dec 02 2015
  • Mathematica
    g[n_, k_, j_] := g[n, k, j] = If[n < k - 1, 0, If[k == 2, If[ Mod[n, j] == 0, 1, 0], Sum[g[n - j x, k - 1, x], {x, 1, Floor[(n - k + 2)/j]}]]];
    f[n_] := Sum[g[n, 6, j], {j, 1, n - 4}];
    Array[f, 100] (* Jean-François Alcover, Sep 25 2020, after Robert Israel *)

A274628 Nathanson's orphan-counting function h(n).

Original entry on oeis.org

1, 4, 7, 13, 15, 26, 25, 39, 40, 54, 49, 79, 63, 88, 88, 112, 93, 140, 109, 159, 142, 170, 143, 224, 168, 216, 202, 255, 199, 304, 219, 308, 268, 316, 274, 404, 281, 370, 338, 438, 323, 484, 345, 481, 433, 484, 389, 611, 422, 566, 492, 607, 459, 684, 508, 692
Offset: 1

Author

N. J. A. Sloane, Jul 07 2016

Keywords

Comments

Number of integer solutions to a*b - c*d = n such that a > c >= 0 and b > d >= 0. - David Radcliffe, Mar 28 2019

Crossrefs

Programs

  • Mathematica
    Table[Total[Function[parts, Count[CountDistinct /@ IntegerPartitions[n, All, parts], 2]] /@ Subsets[Range[n], {2}]] + 2 DivisorSigma[1, n] - DivisorSigma[0, n], {n, 1, 100}] (* Eric Rowland, May 26 2018 *)
  • PARI
    my(N=66, x='x+O('x^N)); Vec(sum(i=1, N, sum(j=1, N\i, x^(i*j)/((1-x^i)*(1-x^j))))) \\ Seiichi Manyama, Jan 08 2022
    
  • Python
    from sympy import divisor_sigma
    def A274628(n): return int(sum(divisor_sigma(j,0)*divisor_sigma(n-j,0) for j in range(1,(n-1>>1)+1)) + ((divisor_sigma(n+1>>1,0)**2 if n-1&1 else 0)-divisor_sigma(n,0)+3*divisor_sigma(n)>>1)) # Chai Wah Wu, Aug 30 2024

Formula

a(n) = A002133(n) + 2*A000203(n) - A000005(n). - David Radcliffe, Mar 28 2019
G.f.: Sum_{i,j>=1} x^(i*j)/((1-x^i)*(1-x^j)). - Seiichi Manyama, Jan 08 2022

Extensions

More terms from Eric Rowland, May 26 2018

A367589 Numbers with exactly two distinct prime factors, both appearing with different exponents.

Original entry on oeis.org

12, 18, 20, 24, 28, 40, 44, 45, 48, 50, 52, 54, 56, 63, 68, 72, 75, 76, 80, 88, 92, 96, 98, 99, 104, 108, 112, 116, 117, 124, 135, 136, 144, 147, 148, 152, 153, 160, 162, 164, 171, 172, 175, 176, 184, 188, 189, 192, 200, 207, 208, 212, 224, 232, 236, 242, 244
Offset: 1

Author

Gus Wiseman, Dec 01 2023

Keywords

Comments

First differs from A177425 in lacking 360.
First differs from A182854 in lacking 360.
These are the Heinz numbers of the partitions counted by A182473.

Examples

			The terms together with their prime indices begin:
  12: {1,1,2}
  18: {1,2,2}
  20: {1,1,3}
  24: {1,1,1,2}
  28: {1,1,4}
  40: {1,1,1,3}
  44: {1,1,5}
  45: {2,2,3}
  48: {1,1,1,1,2}
  50: {1,3,3}
  52: {1,1,6}
  54: {1,2,2,2}
  56: {1,1,1,4}
  63: {2,2,4}
  68: {1,1,7}
  72: {1,1,1,2,2}
		

Crossrefs

The case of any multiplicities is A007774, counts A002133.
These partitions are counted by A182473.
The case of equal exponents is A367590, counts A367588.
A000041 counts integer partitions, strict A000009.
A091602 counts partitions by greatest multiplicity, least A243978.
A098859 counts partitions with distinct multiplicities, ranks A130091.
A116608 counts partitions by number of distinct parts.

Programs

  • Mathematica
    Select[Range[100], PrimeNu[#]==2&&UnsameQ@@Last/@FactorInteger[#]&]

A367590 Numbers with exactly two distinct prime factors, both appearing with the same exponent.

Original entry on oeis.org

6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 36, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 100, 106, 111, 115, 118, 119, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 177, 178, 183, 185, 187, 194
Offset: 1

Author

Gus Wiseman, Dec 01 2023

Keywords

Comments

First differs from A268390 in lacking 210.
First differs from A238748 in lacking 210.
These are the Heinz numbers of the partitions counted by A367588.

Examples

			The terms together with their prime indices begin:
     6: {1,2}         57: {2,8}        106: {1,16}
    10: {1,3}         58: {1,10}       111: {2,12}
    14: {1,4}         62: {1,11}       115: {3,9}
    15: {2,3}         65: {3,6}        118: {1,17}
    21: {2,4}         69: {2,9}        119: {4,7}
    22: {1,5}         74: {1,12}       122: {1,18}
    26: {1,6}         77: {4,5}        123: {2,13}
    33: {2,5}         82: {1,13}       129: {2,14}
    34: {1,7}         85: {3,7}        133: {4,8}
    35: {3,4}         86: {1,14}       134: {1,19}
    36: {1,1,2,2}     87: {2,10}       141: {2,15}
    38: {1,8}         91: {4,6}        142: {1,20}
    39: {2,6}         93: {2,11}       143: {5,6}
    46: {1,9}         94: {1,15}       145: {3,10}
    51: {2,7}         95: {3,8}        146: {1,21}
    55: {3,5}        100: {1,1,3,3}    155: {3,11}
		

Crossrefs

The case of any multiplicities is A007774, counts A002133.
Partitions of this type are counted by A367588.
The case of distinct exponents is A367589, counts A182473.
A000041 counts integer partitions, strict A000009.
A091602 counts partitions by greatest multiplicity, least A243978.
A116608 counts partitions by number of distinct parts.

Programs

  • Mathematica
    Select[Range[100], SameQ@@Last/@If[#==1, {}, FactorInteger[#]]&&PrimeNu[#]==2&]
    Select[Range[200],PrimeNu[#]==2&&Length[Union[FactorInteger[#][[;;,2]]]]==1&] (* Harvey P. Dale, Aug 04 2025 *)

Formula

Union of A006881 and A303661. - Michael De Vlieger, Dec 01 2023

A274109 Triangle read by rows: T(n,k) = number of partitions of n into exactly k parts with exactly two different sizes, the sizes being relatively prime (n >= 3, 2 <= k <= n-1).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 3, 3, 2, 2, 1, 2, 2, 2, 2, 2, 1, 3, 3, 2, 3, 2, 2, 1, 2, 2, 4, 1, 3, 2, 2, 1, 5, 5, 3, 4, 2, 3, 2, 2, 1, 2, 2, 2, 2, 3, 2, 3, 2, 2, 1, 6, 6, 4, 5, 2, 4, 2, 3, 2, 2, 1, 3, 3, 5, 3, 4, 1, 4, 2, 3, 2, 2, 1, 4, 4, 3, 3, 4, 4, 2, 4, 2, 3, 2, 2, 1, 4, 4, 5, 3, 4, 3, 3, 2, 4, 2, 3, 2, 2, 1, 8, 8, 5, 7, 3, 5, 3, 4, 2, 4, 2, 3, 2, 2, 1, 3, 3, 5, 2, 5, 2, 4, 2, 4, 2, 4, 2, 3, 2, 2, 1, 9, 9, 6, 7, 3, 7, 3, 4, 3, 4, 2, 4, 2, 3, 2, 2, 1
Offset: 3

Author

N. J. A. Sloane, Jun 17 2016

Keywords

Examples

			Triangle T(n,k) (with columns n >= 3 and k >= 2) begins as follows:
  1;
  1, 1;
  2, 2, 1;
  1, 1, 2, 1;
  3, 3, 2, 2, 1;
  2, 2, 2, 2, 2, 1;
  3, 3, 2, 3, 2, 2, 1;
  2, 2, 4, 1, 3, 2, 2, 1;
  5, 5, 3, 4, 2, 3, 2, 2, 1;
  2, 2, 2, 2, 3, 2, 3, 2, 2, 1;
  6, 6, 4, 5, 2, 4, 2, 3, 2, 2, 1;
  3, 3, 5, 3, 4, 1, 4, 2, 3, 2, 2, 1;
  4, 4, 3, 3, 4, 4, 2, 4, 2, 3, 2, 2, 1;
  ...
		

Crossrefs

Row sums give A274108.

A307370 Number of integer partitions of n with 2 distinct parts, none appearing more than twice.

Original entry on oeis.org

0, 0, 0, 1, 2, 4, 4, 6, 7, 7, 10, 10, 11, 12, 15, 13, 17, 16, 19, 18, 22, 19, 25, 22, 26, 24, 30, 25, 32, 28, 34, 30, 37, 31, 40, 34, 41, 36, 45, 37, 47, 40, 49, 42, 52, 43, 55, 46, 56, 48, 60, 49, 62, 52, 64, 54, 67, 55, 70, 58, 71, 60, 75, 61, 77, 64, 79, 66
Offset: 0

Author

Gus Wiseman, Apr 05 2019

Keywords

Comments

The Heinz numbers of these partitions appear to be given by A296205.

Examples

			The a(3) = 1 through a(10) = 10 partitions:
  (21)  (31)   (32)   (42)    (43)   (53)    (54)   (64)
        (211)  (41)   (51)    (52)   (62)    (63)   (73)
               (221)  (411)   (61)   (71)    (72)   (82)
               (311)  (2211)  (322)  (332)   (81)   (91)
                              (331)  (422)   (441)  (433)
                              (511)  (611)   (522)  (442)
                                     (3311)  (711)  (622)
                                                    (811)
                                                    (3322)
                                                    (4411)
		

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Length[Union[#]]==2&&Max@@Length/@Split[#]<=2&]],{n,0,30}]
  • PARI
    concat([0,0,0], Vec(x^3*(1 + 3*x + 6*x^2 + 7*x^3 + 6*x^4 + 4*x^5) / ((1 - x)^2*(1 + x)^2*(1 + x^2)*(1 + x + x^2)) + O(x^40))) \\ Colin Barker, Apr 08 2019

Formula

From Colin Barker, Apr 08 2019: (Start)
G.f.: x^3*(1 + 3*x + 6*x^2 + 7*x^3 + 6*x^4 + 4*x^5) / ((1 - x)^2*(1 + x)^2*(1 + x^2)*(1 + x + x^2)).
a(n) = -a(n-1) + a(n-3) + 2*a(n-4) + a(n-5) - a(n-7) - a(n-8) for n>8. (End)
a(n) = (27*n + 3*(n - 7)*(-1)^n - 53 - 6*A056594(n) + 8*A061347(n))/24 for n > 0. - Stefano Spezia, Feb 20 2024
Previous Showing 21-30 of 33 results. Next