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 13 results. Next

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

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

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

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

A049991 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, 3, 6, 9, 15, 19, 25, 33, 41, 47, 60, 67, 77, 92, 104, 113, 132, 142, 158, 178, 193, 205, 231, 247, 264, 289, 310, 325, 359, 375, 397, 427, 449, 473, 513, 532, 556, 591, 623, 644, 689, 711, 741, 788, 817, 841, 892, 920, 957, 1003, 1038, 1065, 1121, 1157, 1197, 1248, 1284, 1314, 1384, 1415
Offset: 1

Views

Author

Keywords

Crossrefs

Formula

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

Extensions

More terms from Petros Hadjicostas, Sep 29 2019
Showing 1-10 of 13 results. Next