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.

Showing 1-10 of 24 results. Next

A049988 Number of nondecreasing arithmetic progressions of positive integers with sum n.

Original entry on oeis.org

1, 1, 2, 3, 4, 4, 7, 5, 7, 9, 9, 7, 14, 8, 11, 16, 13, 10, 20, 11, 17, 21, 16, 13, 27, 17, 18, 26, 22, 16, 35, 17, 23, 31, 23, 25, 41, 20, 25, 36, 33, 22, 46, 23, 31, 48, 30, 25, 52, 29, 38, 47, 36, 28, 57, 37, 41, 52, 37, 31, 71, 32, 39, 62, 44, 43, 69, 35, 45, 62, 57, 37, 79, 38
Offset: 0

Views

Author

Keywords

Comments

From Gus Wiseman, May 03 2019: (Start)
a(n) is the number of integer partitions of n with equal differences. The Heinz numbers of these partitions are given by A325328. For example, the a(1) = 1 through a(9) = 9 partitions are:
1 2 3 4 5 6 7 8 9
11 21 22 32 33 43 44 54
111 31 41 42 52 53 63
1111 11111 51 61 62 72
222 1111111 71 81
321 2222 333
111111 11111111 432
531
111111111
(End)
From Petros Hadjicostas, Sep 29 2019: (Start)
We show how Leroy Quet's g.f. Sum_{n >= 0} a(n)*x^n = 1/(1-x) + Sum_{k >= 2} x^k/(1-x^(k*(k-1)/2))/(1-x^k) in the Formula section below can be derived from Graeme McRae's g.f. for A049982 (see one of the links below).
Let b(n) = A049982(n) for n >= 1. Then Graeme McRae proved that Sum_{n >= 1} b(n)*x^n = Sum_{k >= 2} x^t(k)/(x^t(k) - x^t(k-1) - x^k + 1) = Sum_{k >= 2} x^t(k)/((1 - x^k) * (1 - x^t(k-1))), where t(k) = A000217(k) = k*(k+1)/2.
Since a(n) - b(n) = A000005(n) for n >= 1, to finish the proof, we only need to show that K(x) := 1 + Sum_{n >= 1} a(n)*x^n - Sum_{n >= 1} b(n)*x^n is the g.f. of A000005 (= number of divisors). But it is easy to show that K(x) = 1 + Sum_{k >= 1} x^k/(1 - x^k) = 1 + Sum_{n >= 1} A000005(n)*x^n (Lambert series for the number of divisors function). (End)

Crossrefs

Programs

  • Mathematica
    a[n_]:=If[n==0,1,Block[{i,c=Floor[(n-1)/2]+DivisorSigma[0,n]},Do[i=1;While[i*kGus Wiseman, May 07 2019 *)
    Table[Length[Select[IntegerPartitions[n],SameQ@@Differences[#]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
  • PARI
    seq(n)={Vec(1/(1-x) + sum(k=2, n, x^k/(1 - x^(k*(k-1)/2))/(1-x^k) + O(x*x^n)))} \\ Andrew Howroyd, Sep 28 2019

Formula

G.f.: 1/(1-x) + Sum_{k>=2} x^k/(1-x^(k*(k-1)/2))/(1-x^k). - Leroy Quet, Apr 08 2010. [Edited by Gus Wiseman, May 03 2019]
a(n) = A049982(n) + A000005(n) = A049980(n) + A000005(n) - 1 for n >= 1. - Petros Hadjicostas, Sep 28 2019

Extensions

Edited by Max Alekseyev, May 03 2010
a(0) = 1 prepended by Gus Wiseman, May 03 2019

A175342 Number of arithmetic progressions (where the difference between adjacent terms is either positive, 0, or negative) of positive integers that sum to n.

Original entry on oeis.org

1, 2, 4, 5, 6, 10, 8, 10, 15, 14, 12, 22, 14, 18, 28, 21, 18, 34, 20, 28, 38, 28, 24, 46, 31, 32, 48, 38, 30, 62, 32, 40, 58, 42, 46, 73, 38, 46, 68, 58, 42, 84, 44, 56, 90, 56, 48, 94, 55, 70, 90, 66, 54, 106, 70, 74, 100, 70, 60, 130, 62, 74, 118, 81, 82, 130, 68, 84, 120
Offset: 1

Views

Author

Leroy Quet, Apr 17 2010

Keywords

Examples

			From _Gus Wiseman_, May 15 2019: (Start)
The a(1) = 1 through a(8) = 10 compositions with equal differences:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (12)   (13)    (14)     (15)      (16)       (17)
             (21)   (22)    (23)     (24)      (25)       (26)
             (111)  (31)    (32)     (33)      (34)       (35)
                    (1111)  (41)     (42)      (43)       (44)
                            (11111)  (51)      (52)       (53)
                                     (123)     (61)       (62)
                                     (222)     (1111111)  (71)
                                     (321)                (2222)
                                     (111111)             (11111111)
(End)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SameQ@@Differences[#]&]],{n,0,15}] (* returns a(0) = 1, Gus Wiseman, May 15 2019*)

Formula

a(n) = 2*A049988(n) - A000005(n).
G.f.: x/(1-x) + Sum_{k>=2} x^k * (1 + x^(k(k-1)/2)) / (1 - x^(k(k-1)/2)) / (1 -x^k).

Extensions

Edited and extended by Max Alekseyev, May 03 2010

A049982 Number of arithmetic progressions of 2 or more positive integers, strictly increasing with sum n.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 3, 3, 6, 5, 5, 8, 6, 7, 12, 8, 8, 14, 9, 11, 17, 12, 11, 19, 14, 14, 22, 16, 14, 27, 15, 17, 27, 19, 21, 32, 18, 21, 32, 25, 20, 38, 21, 25, 42, 26, 23, 42, 26, 32, 43, 30, 26, 49, 33, 33, 48, 33, 29, 59, 30, 35, 56, 37, 39, 61, 33, 39, 58, 49, 35, 67, 36, 42
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    seq(n)={Vec(sum(k=2, (sqrtint(8*n+1)-1)\2, x^binomial(k+1, 2)/(x^binomial(k+1, 2) - x^binomial(k, 2) - x^k + 1) + O(x*x^n)), -n)} \\ Andrew Howroyd, Sep 28 2019

Formula

a(n) has generating function x^3/(x^3 - x - x^2 + 1) + x^6/(x^6 - x^3 - x^3 + 1) + x^10/(x^10 - x^6 - x^4 + 1) + ... = Sum_{k >= 2} x^t(k)/(x^t(k) - x^t(k-1) - x^k + 1), where t(k) = A000217(k) is the k-th triangular number. Term k of this generating function generates the number of arithmetic progressions of k positive integers, strictly increasing with sum n. - Graeme McRae, Feb 08 2007
From Petros Hadjicostas, Sep 27 2019: (Start)
a(n) = A049980(n) - 1 = A049988(n) - A000005(n).
a(n) = A049981(n) - A049981(n-1) - 1 for n >= 2.
Conjecture: a(n) = Sum_{m|n, m odd > 1} floor(2 * (n - m)/(m* (m - 1))) + Sum_{m|n} floor((n - m * (5 - (-1)^(n/m))/2 + m^2 * (1 - (-1)^(n/m)))/(2*m * (2*m - 1))).
(End)

Extensions

More terms from Petros Hadjicostas, Sep 28 2019

A320347 Number of partitions of n into distinct parts (a_1, a_2, ... , a_m) (a_1 > a_2 > ... > a_m and Sum_{k=1..m} a_k = n) such that a1 - a2, a2 - a3, ..., a_{m-1} - a_m are different.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 6, 6, 9, 11, 10, 15, 18, 19, 24, 31, 29, 40, 44, 51, 56, 72, 69, 90, 97, 114, 125, 154, 151, 192, 207, 237, 255, 304, 314, 377, 401, 457, 493, 573, 596, 698, 750, 845, 905, 1034, 1104, 1255, 1354, 1507, 1624, 1817, 1955, 2178, 2357, 2605, 2794, 3077, 3380
Offset: 1

Views

Author

Seiichi Manyama, Oct 11 2018

Keywords

Comments

In other words, a(n) is the number of strict integer partitions of n with distinct first differences. - Gus Wiseman, Mar 25 2021

Examples

			n = 9
[9]        ooooooooo
------------------------------------
[8, 1]      *******o  a_1 - a_2 = 7.
            oooooooo
------------------------------------
[7, 2]       *****oo  a_1 - a_2 = 5.
             ooooooo
------------------------------------
[6, 3]        ***ooo  a_1 - a_2 = 3.
              oooooo
------------------------------------
[6, 2, 1]         *o  a_2 - a_3 = 1.
              ****oo  a_1 - a_2 = 4.
              oooooo
------------------------------------
[5, 4]         *oooo  a_1 - a_2 = 1.
               ooooo
------------------------------------
a(9) = 6.
		

Crossrefs

The equal instead of distinct version is A049980.
The non-strict version is A325325 (ranking: A325368).
The non-strict ordered version is A325545.
The version for first quotients is A342520 (non-strict: A342514).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&UnsameQ@@Differences[#]&]],{n,0,30}] (* Gus Wiseman, Mar 27 2021 *)

A049987 a(n) is the number of arithmetic progressions of 4 or more positive integers, strictly increasing with sum <= n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 3, 4, 4, 5, 5, 7, 8, 10, 10, 11, 13, 15, 16, 19, 19, 23, 23, 25, 26, 29, 33, 37, 37, 40, 41, 47, 47, 52, 52, 56, 62, 66, 66, 70, 72, 80, 82, 87, 87, 93, 99, 105, 107, 112, 112, 123, 123, 128, 133, 139, 146, 154, 154, 160, 162, 177, 177, 186, 186, 192, 202
Offset: 1

Views

Author

Keywords

Crossrefs

Formula

From Petros Hadjicostas, Sep 29 2019: (Start)
a(n) = Sum_{k = 1..n} A049986(k).
G.f.: (g.f. of A049986)/(1-x). (End)

Extensions

More terms from Petros Hadjicostas, Sep 29 2019

A049983 a(n) is the number of arithmetic progressions of 2 or more positive integers, strictly increasing with sum <= n.

Original entry on oeis.org

0, 0, 1, 2, 4, 7, 10, 13, 19, 24, 29, 37, 43, 50, 62, 70, 78, 92, 101, 112, 129, 141, 152, 171, 185, 199, 221, 237, 251, 278, 293, 310, 337, 356, 377, 409, 427, 448, 480, 505, 525, 563, 584, 609, 651, 677, 700, 742, 768, 800, 843, 873, 899, 948, 981, 1014, 1062, 1095, 1124, 1183, 1213, 1248, 1304, 1341, 1380
Offset: 1

Views

Author

Keywords

Examples

			a(7) = 10 because we have the following arithmetic progressions of two or more positive integers, strictly increasing with sum <= n = 7: 1+2, 1+3, 1+4, 1+5, 1+6, 2+3, 2+4, 2+5, 3+4, and 1+2+3. - _Petros Hadjicostas_, Sep 27 2019
		

Crossrefs

Formula

From Petros Hadjicostas, Sep 29 2019: (Start)
a(n) = Sum_{k = 1..n} A049982(k) = -n + Sum_{k = 1..n} A049980(k) = -n + A049981(k).
G.f.: (g.f. of A049982)/(1-x). (End)

Extensions

More terms from Petros Hadjicostas, Sep 27 2019

A049986 a(n) is the number of arithmetic progressions of 4 or more positive integers, strictly increasing with sum n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 2, 1, 2, 0, 1, 2, 2, 1, 3, 0, 4, 0, 2, 1, 3, 4, 4, 0, 3, 1, 6, 0, 5, 0, 4, 6, 4, 0, 4, 2, 8, 2, 5, 0, 6, 6, 6, 2, 5, 0, 11, 0, 5, 5, 6, 7, 8, 0, 6, 2, 15, 0, 9, 0, 6, 10, 7, 4, 9, 0, 14, 5, 7, 0, 12, 9, 7, 3
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

G.f.: Sum_{k >= 4} x^t(k)/(x^t(k) - x^t(k-1) - x^k + 1) = Sum_{k >= 4} x^t(k)/((1 - x^k)*(1 - x^t(k-1))), where t(k) = k*(k+1)/2 = A000217(k) is the k-th triangular number [Graeme McRae]. - Petros Hadjicostas, Sep 29 2019
a(n) = A049994(n) - A321014(n). [Listed by Sequence Machine and obviously true] - Antti Karttunen, Feb 20 2023

A049981 a(n) is the number of arithmetic progressions of positive integers, strictly increasing with sum <= n.

Original entry on oeis.org

1, 2, 4, 6, 9, 13, 17, 21, 28, 34, 40, 49, 56, 64, 77, 86, 95, 110, 120, 132, 150, 163, 175, 195, 210, 225, 248, 265, 280, 308, 324, 342, 370, 390, 412, 445, 464, 486, 519, 545, 566, 605, 627, 653, 696, 723, 747, 790, 817, 850, 894, 925, 952, 1002, 1036, 1070, 1119, 1153, 1183, 1243, 1274, 1310
Offset: 1

Views

Author

Keywords

Crossrefs

Formula

From Petros Hadjicostas, Sep 29 2019: (Start)
a(n) = Sum_{k = 1..n} A049980(k) = n + Sum_{k = 1..n} A049982(k).
G.f.: (g.f. of A049980)/(1-x). (End)

Extensions

More terms from Petros Hadjicostas, Sep 29 2019

A049990 a(n) is the number of arithmetic progressions of 2 or more positive integers, nondecreasing with sum n.

Original entry on oeis.org

0, 1, 2, 3, 3, 6, 4, 6, 8, 8, 6, 13, 7, 10, 15, 12, 9, 19, 10, 16, 20, 15, 12, 26, 16, 17, 25, 21, 15, 34, 16, 22, 30, 22, 24, 40, 19, 24, 35, 32, 21, 45, 22, 30, 47, 29, 24, 51, 28, 37, 46, 35, 27, 56, 36, 40, 51, 36, 30, 70, 31, 38, 61, 43
Offset: 1

Views

Author

Keywords

Examples

			a(6) counts these 6 partitions of 6: [5,1], [4,2], [3,3], [3,2,1], [2,2,2], [1,1,1,1,1,1].
		

Crossrefs

Programs

  • Mathematica
    (* Program 1 *)
    Map[Length[Map[#[[2]] &, Select[Map[{Apply[SameQ, Differences[#]], #} &,
    IntegerPartitions[#]], #[[1]] &]]] &, Range[40]] - 1
    (* Peter J. C. Moses, Dec 24 2016 *)
    (* Program 2 *)
    enumerateArithmeticPartitions[n_] := Module[{allDivs, oddDivs},
    {allDivs, oddDivs} = {#, Select[#, OddQ]} &[Divisors[n]]; Map[Reverse, Union[Flatten[Table[If[OddQ[cDiff], (Flatten[
    Map[{If[(2 n - #) cDiff <= # (# - 2), {Table[(cDiff + # - 2 cDiff n/#)/2 +
    cDiff term, {term, 0, 2 n/# - 1}]}, {}], If[# (# - 1) cDiff <= 2 (n - #),
    {Table[(cDiff + 2 n/# - # cDiff)/2 + cDiff term, {term, 0, # - 1}]},
    {}]} &, oddDivs], 2]), (Flatten[Map[If[(n - #) cDiff <= 2 # (# - 1),
    {Table[(cDiff + 2 # - n cDiff/#)/2 + cDiff term, {term, 0, n/# - 1}]}, {}] &,
    allDivs], 1])], {cDiff, 0, n - 2}], 1]]]];
    Join[{0}, Map[Length[enumerateArithmeticPartitions[#]] - 1 &, Range[2, 300]]]
    n = 12; enumerateArithmeticPartitions[12] (* shows the desired partition of n *)
    (* Peter J. C. Moses, Dec 24 2016 *)

Formula

a(A000040(n)) = A111333(n). - Clark Kimberling, Dec 26 2016
From Petros Hadjicostas, Sep 29 2019: (Start)
a(n) = A049988(n) - 1. [Note that A049988 has offset 0.]
G.f.: Sum_{k>=2} x^k/(1-x^(k*(k-1)/2))/(1-x^k). [Leroy Quet from A049988]
(End)

A127938 Number of arithmetic progressions of 2 or more nonnegative integers, strictly increasing with sum n.

Original entry on oeis.org

1, 1, 3, 2, 3, 6, 4, 4, 8, 7, 6, 11, 7, 8, 15, 9, 9, 17, 10, 13, 20, 13, 12, 22, 15, 15, 24, 18, 15, 32, 16, 18, 29, 20, 22, 36, 19, 22, 34, 27, 21, 42, 22, 26, 46, 27, 24, 45, 27, 34, 45, 31, 27, 52, 35, 35, 50, 34, 30, 64, 31, 36, 59, 38, 40, 65, 34, 40, 60, 51, 36, 71, 37, 43
Offset: 1

Views

Author

Graeme McRae, Feb 08 2007

Keywords

Comments

From Petros Hadjicostas, Sep 28 2019: (Start)
We want to find the number of pairs of integers (b, w) such that b >= 0 and w >= 1 and there is an integer m >= 1 so that m*b + (1/2)*m*(m-1)*w = n.
If we insist that b > 0, we get A049982 (= number of arithmetic progressions of 2 or more positive integers, strictly increasing with sum n). The number of integers m >= 1 such that (1/2)*m*(m-1)*w = n equals A007862(n) (= number of triangular numbers that divide n).
Thus, to get a(n), we add A049982(n) to A007862(n).
(End)

Examples

			a(10) = 7 because there are five 2-element arithmetic progressions that sum to 10, as well as 1+2+3+4 and 0+1+2+3+4.
		

Crossrefs

Programs

  • PARI
    seq(n)={Vec(sum(k=1, (sqrtint(8*n+1)-1)\2,  x^binomial(k+1, 2)/(x^binomial(k+2, 2) - x^binomial(k+1, 2) - x^(k+1) + 1) + O(x*x^n)))} \\ Andrew Howroyd, Sep 28 2019

Formula

G.f.: x/(x^3 - x - x^2 + 1) + x^3/(x^6 - x^3 - x^3 + 1) + x^6/(x^10 - x^6 - x^4 + 1) + ... = Sum_{k >= 2} x^{t(k-1)}/(x^{t(k)} - x^{t(k-1)} - x^k + 1), where t(k) = A000217(k) is the k-th triangular number. Term k of this generating function generates the number of arithmetic progressions of k nonnegative integers, strictly increasing with sum n.
a(n) = A049982(n) + A007862(n). - Petros Hadjicostas, Sep 28 2019
Showing 1-10 of 24 results. Next