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

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

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

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

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)

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

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

Original entry on oeis.org

0, 0, 1, 1, 1, 3, 1, 2, 4, 3, 1, 7, 1, 3, 8, 4, 1, 10, 1, 6, 10, 4, 1, 14, 4, 4, 12, 7, 1, 19, 1, 6, 14, 5, 7, 22, 1, 5, 16, 12, 1, 24, 1, 8, 25, 6, 1, 27, 4, 12, 21, 9, 1, 29, 9, 12, 23, 7, 1, 40, 1, 7, 30, 11, 10, 35, 1, 10, 27, 21, 1, 42, 1, 8, 39, 11, 7, 40, 1, 22, 35, 9, 1, 49, 12, 9, 34
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

G.f.: Sum_{k>=3} x^k/(1-x^(k*(k-1)/2))/(1-x^k). [Leroy Quet from A049988] - Petros Hadjicostas, Sep 29 2019
a(n) = A014405(n) + A023645(n) = A049994(n) + A175676(n). [Two of the formulas listed by Sequence Machine, both obviously true] - Antti Karttunen, Feb 20 2023

Extensions

More terms from Petros Hadjicostas, Sep 29 2019

A068322 Number of arithmetic progressions of positive odd integers, strictly increasing with sum n.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 2, 2, 2, 1, 3, 1, 3, 3, 5, 1, 4, 1, 5, 4, 5, 1, 7, 2, 6, 5, 8, 1, 7, 1, 9, 6, 8, 2, 11, 1, 9, 7, 12, 1, 10, 1, 12, 10, 11, 1, 15, 2, 12, 9, 15, 1, 13, 3, 16, 10, 14, 1, 18, 1, 15, 12, 20, 4, 17, 1, 19, 12, 17, 1, 22, 1, 18, 16, 22, 2, 20, 1, 24, 15, 20, 1, 25, 5, 21, 15, 26
Offset: 1

Views

Author

Naohiro Nomoto, Feb 27 2002

Keywords

Examples

			From _Petros Hadjicostas_, Sep 29 2019: (Start)
a(12) = 3 because we have the following arithmetic progressions of odd numbers, strictly increasing with sum n=12: 1+11, 3+9, and 5+7.
a(13) = 1 because we have only the following arithmetic progressions of odd numbers, strictly increasing with sum n=13: 13.
a(14) = 3 because we have the following arithmetic progressions of odd numbers, strictly increasing with sum n=14: 1+13, 3+11, and 5+9.
a(15) = 3 because we have the following arithmetic progressions of odd numbers, strictly increasing with sum n=15: 15, 3+5+7, and 1+5+9.
(End)
		

Crossrefs

Formula

From Petros Hadjicostas, Oct 01 2019: (Start)
a(n) = A068324(n) - A001227(n) + (1/2) * (1 - (-1)^n).
G.f.: x/(1 - x^2) + Sum_{m >= 2} x^(m^2)/((1 - x^(2*m)) * (1 - x^(m*(m-1)))).
(End)

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

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 2, 1, 3, 1, 3, 1, 3, 3, 4, 1, 4, 1, 6, 3, 4, 1, 6, 4, 4, 3, 7, 1, 9, 1, 6, 3, 5, 7, 10, 1, 5, 3, 12, 1, 10, 1, 8, 10, 6, 1, 11, 4, 12, 4, 9, 1, 11, 9, 12, 4, 7, 1, 20, 1, 7, 9, 11, 10, 13, 1, 10, 4, 21, 1, 18, 1, 8, 14, 11, 7, 14, 1, 22, 8, 9, 1, 21, 12, 9, 5, 15, 1, 29, 8
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

G.f.: Sum_{k >= 4} x^k/(1-x^(k*(k-1)/2))/(1-x^k). [Leroy Quet from A049988] - Petros Hadjicostas, Sep 29 2019
a(n) = A049992(n) - A175676(n) = A049986(n) + A321014(n). [Two of the formulas listed by Sequence Machine, both obviously true] - Antti Karttunen, Feb 20 2023

Extensions

More terms from Petros Hadjicostas, Sep 29 2019

A068324 Number of nondecreasing arithmetic progressions of positive odd integers with sum n.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 2, 3, 4, 4, 2, 5, 2, 5, 6, 6, 2, 7, 2, 7, 7, 7, 2, 9, 4, 8, 8, 10, 2, 11, 2, 10, 9, 10, 5, 14, 2, 11, 10, 14, 2, 14, 2, 14, 15, 13, 2, 17, 4, 15, 12, 17, 2, 17, 6, 18, 13, 16, 2, 22, 2, 17, 17, 21, 7, 21, 2, 21, 15, 21, 2, 25, 2, 20, 21, 24, 5, 24, 2, 26, 19, 22, 2, 29, 8
Offset: 1

Views

Author

Naohiro Nomoto, Feb 27 2002

Keywords

Examples

			From _Petros Hadjicostas_, Sep 29 2019: (Start)
a(6) = 3 because we have the following nondecreasing arithmetic progressions of positive odd integers with sum n=6: 1+5, 3+3, and 1+1+1+1+1+1.
a(7) = 2 because we have the following nondecreasing arithmetic progressions of positive odd integers with sum n=7: 7 and 1+1+1+1+1+1+1.
a(8) = 3 because we have the following nondecreasing arithmetic progressions of positive odd integers with sum n=8: 1+7, 3+5, and 1+1+1+1+1+1+1+1.
(End)
		

Crossrefs

Formula

From Petros Hadjicostas, Oct 01 2019: (Start)
a(n) = A068322(n) + A001227(n) - (1/2) * (1 - (-1)^n).
G.f.: x/(1 - x^2) + Sum_{m >= 2} x^m/((1 - x^(2*m)) * (1 - x^(m*(m-1)))).
(End)

Extensions

Extended and edited by John W. Layman, Mar 15 2002
Showing 1-10 of 12 results. Next