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 19 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

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

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 4, 4, 7, 6, 6, 9, 7, 8, 13, 9, 9, 15, 10, 12, 18, 13, 12, 20, 15, 15, 23, 17, 15, 28, 16, 18, 28, 20, 22, 33, 19, 22, 33, 26, 21, 39, 22, 26, 43, 27, 24, 43, 27, 33, 44, 31, 27, 50, 34, 34, 49, 34, 30, 60, 31, 36, 57, 38, 40
Offset: 1

Views

Author

Keywords

Comments

We need to find the number of pairs of positive integers (b, w) so that there is a positive integer m such that m*b + m*(m-1)*w/2 = n. - Petros Hadjicostas, Sep 27 2019

Examples

			a(6) = 4 because we have the following strictly increasing arithmetic progressions of positive integers adding up to n = 6: 6, 1+5, 2+4, and 1+2+3. - _Petros Hadjicostas_, Sep 27 2019
		

Crossrefs

Formula

Conjecture: a(n) = 1 + 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))). - Petros Hadjicostas, Sep 27 2019
G.f.: x/(1-x) + Sum_{k >= 2} x^t(k)/(x^t(k) - x^t(k-1) - x^k + 1) = x/(1-x) + Sum_{k >= 2} 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

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

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

A014405 Number of arithmetic progressions of 3 or more positive integers, strictly increasing with sum n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 3, 0, 1, 5, 1, 0, 6, 0, 2, 7, 2, 0, 8, 2, 2, 9, 3, 0, 13, 0, 2, 11, 3, 4, 15, 0, 3, 13, 6, 0, 18, 0, 4, 20, 4, 0, 19, 2, 8, 18, 5, 0, 23, 6, 6, 20, 5, 0, 30, 0, 5, 25, 6, 7, 29, 0, 6, 24, 15, 0, 32, 0, 6, 34, 7, 4, 34, 0, 14, 31, 7, 0, 39, 9, 7, 31, 9, 0, 49, 5, 9, 33, 8, 10, 42, 0, 12
Offset: 1

Views

Author

Keywords

Examples

			E.g., 15 = 1+2+3+4+5 = 1+5+9 = 2+5+8 = 3+5+7 = 4+5+6.
		

Crossrefs

Programs

  • PARI
    a(n)= t=0; st=0; forstep(s=(n-3)\3,1,-1, st++; for(c=1,st, m=3; w=m*(s+c); while(wRick L. Shepherd, Aug 30 2006

Formula

G.f.: Sum_{k >= 3} x^t(k)/(x^t(k) - x^t(k-1) - x^k + 1) = Sum_{k >= 3} 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) = A049992(n) - A023645(n). - Antti Karttunen, Feb 20 2023

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

A014406 Number of strictly increasing arithmetic progressions of positive integers with at least 3 terms and sum <= n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 3, 4, 4, 7, 7, 8, 13, 14, 14, 20, 20, 22, 29, 31, 31, 39, 41, 43, 52, 55, 55, 68, 68, 70, 81, 84, 88, 103, 103, 106, 119, 125, 125, 143, 143, 147, 167, 171, 171, 190, 192, 200, 218, 223, 223, 246, 252, 258, 278, 283, 283, 313, 313, 318, 343, 349, 356, 385, 385
Offset: 1

Views

Author

Keywords

Examples

			From _Petros Hadjicostas_, Sep 29 2019: (Start)
a(8) = 1 because we have only the following strictly increasing arithmetic progression of positive integers with at least 3 terms and sum <= 8: 1+2+3.
a(9) = 3 because we have the following strictly increasing arithmetic progressions of positive integers with at least 3 terms and sum <= 9: 1+2+3, 1+3+5, and 2+3+4.
a(10) = 4 because we have the following strictly increasing arithmetic progressions of positive integers with at least 3 terms and sum <= 10: 1+2+3, 1+3+5, 2+3+4, and 1+2+3+4.
(End)
		

Crossrefs

Formula

a(n) = Sum_{k=1..n} A014405(k). - Sean A. Irvine, Oct 22 2018
G.f.: (g.f. of A014405)/(1-x). - Petros Hadjicostas, Sep 29 2019

Extensions

a(59)-a(67) corrected by Fausto A. C. Cariboni, Oct 02 2018

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)
Showing 1-10 of 19 results. Next