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

A329739 Number of compositions of n whose run-lengths are all different.

Original entry on oeis.org

1, 1, 2, 2, 5, 8, 10, 20, 28, 41, 62, 102, 124, 208, 278, 426, 571, 872, 1158, 1718, 2306, 3304, 4402, 6286, 8446, 11725, 15644, 21642, 28636, 38956, 52296, 70106, 93224, 124758, 165266, 218916, 290583, 381706, 503174, 659160, 865020, 1124458, 1473912, 1907298
Offset: 0

Views

Author

Gus Wiseman, Nov 20 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers with sum n.

Examples

			The a(1) = 1 through a(7) = 20 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (111)  (22)    (113)    (33)      (115)
                    (112)   (122)    (114)     (133)
                    (211)   (221)    (222)     (223)
                    (1111)  (311)    (411)     (322)
                            (1112)   (1113)    (331)
                            (2111)   (3111)    (511)
                            (11111)  (11112)   (1114)
                                     (21111)   (1222)
                                     (111111)  (2221)
                                               (4111)
                                               (11113)
                                               (11122)
                                               (22111)
                                               (31111)
                                               (111112)
                                               (111211)
                                               (112111)
                                               (211111)
                                               (1111111)
		

Crossrefs

The normal case is A329740.
The case of partitions is A098859.
Strict compositions are A032020.
Compositions with relatively prime run-lengths are A000740.
Compositions with distinct multiplicities are A242882.
Compositions with distinct differences are A325545.
Compositions with equal run-lengths are A329738.
Compositions with normal run-lengths are A329766.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@Length/@Split[#]&]],{n,0,10}]

Extensions

a(21)-a(26) from Giovanni Resta, Nov 22 2019
a(27)-a(43) from Alois P. Heinz, Jul 06 2020

A329738 Number of compositions of n whose run-lengths are all equal.

Original entry on oeis.org

1, 1, 2, 4, 6, 8, 19, 24, 45, 75, 133, 215, 401, 662, 1177, 2035, 3587, 6190, 10933, 18979, 33339, 58157, 101958, 178046, 312088, 545478, 955321, 1670994, 2925717, 5118560, 8960946, 15680074, 27447350, 48033502, 84076143, 147142496, 257546243, 450748484, 788937192
Offset: 0

Views

Author

Gus Wiseman, Nov 20 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers with sum n.

Examples

			The a(1) = 1 through a(6) = 19 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)
       (11)  (12)   (13)    (14)     (15)
             (21)   (22)    (23)     (24)
             (111)  (31)    (32)     (33)
                    (121)   (41)     (42)
                    (1111)  (131)    (51)
                            (212)    (123)
                            (11111)  (132)
                                     (141)
                                     (213)
                                     (222)
                                     (231)
                                     (312)
                                     (321)
                                     (1122)
                                     (1212)
                                     (2121)
                                     (2211)
                                     (111111)
		

Crossrefs

Compositions with relatively prime run-lengths are A000740.
Compositions with equal multiplicities are A098504.
Compositions with equal differences are A175342.
Compositions with distinct run-lengths are A329739.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SameQ@@Length/@Split[#]&]],{n,0,10}]
  • PARI
    seq(n)={my(b=Vec(1/(1 - sum(k=1, n, x^k/(1+x^k) + O(x*x^n)))-1)); concat([1], vector(n, k, sumdiv(k, d, b[d])))} \\ Andrew Howroyd, Dec 30 2020

Formula

a(n) = Sum_{d|n} A003242(d).
a(n) = A329745(n) + A000005(n).

A325545 Number of compositions of n with distinct differences.

Original entry on oeis.org

1, 1, 2, 3, 7, 13, 17, 34, 59, 105, 166, 279, 442, 730, 1157, 1927, 3045, 4741, 7527, 11667, 18048, 27928, 43334, 65861, 101385, 153404, 232287, 347643, 523721, 780083, 1165331, 1725966, 2561625, 3773838, 5561577, 8151209, 11920717, 17364461, 25269939, 36635775
Offset: 0

Views

Author

Gus Wiseman, May 10 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
The differences of a sequence are defined as if the sequence were increasing, so for example the differences of (3,1,2) are (-2,1).

Examples

			The a(1) = 1 through a(6) = 17 compositions:
  (1)  (2)   (3)   (4)    (5)     (6)
       (11)  (12)  (13)   (14)    (15)
             (21)  (22)   (23)    (24)
                   (31)   (32)    (33)
                   (112)  (41)    (42)
                   (121)  (113)   (51)
                   (211)  (122)   (114)
                          (131)   (132)
                          (212)   (141)
                          (221)   (213)
                          (311)   (231)
                          (1121)  (312)
                          (1211)  (411)
                                  (1131)
                                  (1221)
                                  (1311)
                                  (2112)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@Differences[#]&]],{n,0,15}]

Extensions

More terms from Alois P. Heinz, May 11 2019

A065608 Sum of divisors of n minus the number of divisors of n.

Original entry on oeis.org

0, 1, 2, 4, 4, 8, 6, 11, 10, 14, 10, 22, 12, 20, 20, 26, 16, 33, 18, 36, 28, 32, 22, 52, 28, 38, 36, 50, 28, 64, 30, 57, 44, 50, 44, 82, 36, 56, 52, 82, 40, 88, 42, 78, 72, 68, 46, 114, 54, 87, 68, 92, 52, 112, 68, 112, 76, 86, 58, 156, 60, 92, 98, 120, 80, 136, 66, 120, 92
Offset: 1

Views

Author

Jason Earls, Nov 06 2001

Keywords

Comments

Number of permutations p of {1,2,...,n} such that p(k)-k takes exactly two distinct values. Example: a(4)=4 because we have 4123, 3412, 2143 and 2341. - Max Alekseyev and Emeric Deutsch, Dec 22 2006
Number of solutions to the Diophantine equation xy + yz = n, with x,y,z >= 1.
In other words, number of ways to write n = (a + b) * k for positive integers a, b, k. - Gus Wiseman, Mar 25 2021
Not the same as A184396(n): a(66) = 136 while A184396(66) = 137. - Wesley Ivan Hurt, Dec 26 2013
From Gus Wiseman, Mar 25 2021: (Start)
Also the number of compositions of n into an even number of parts with alternating parts equal. These are finite even-length sequences q of positive integers summing to n such that q(i) = q(i+2) for all possible i. For example, the a(2) = 1 through a(8) = 11 compositions are:
(1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (1,7)
(2,1) (2,2) (2,3) (2,4) (2,5) (2,6)
(3,1) (3,2) (3,3) (3,4) (3,5)
(1,1,1,1) (4,1) (4,2) (4,3) (4,4)
(5,1) (5,2) (5,3)
(1,2,1,2) (6,1) (6,2)
(2,1,2,1) (7,1)
(1,1,1,1,1,1) (1,3,1,3)
(2,2,2,2)
(3,1,3,1)
(1,1,1,1,1,1,1,1)
The odd-length version is A062968.
The version with alternating parts weakly decreasing is A114921, or A342528 if odd-length compositions are included.
The version with alternating parts unequal is A342532, or A224958 if odd-length compositions are included (unordered: A339404/A000726).
Allowing odd lengths as well as even gives A342527.
(End)
Inverse Möbius transform of n-1. - Wesley Ivan Hurt, Jun 29 2024

Crossrefs

Starting (1, 2, 4, 4, 8, 6, ...), = row sums of triangle A077478. - Gary W. Adamson, Nov 12 2007
Starting with "1" = row sums of triangle A176919. - Gary W. Adamson, Apr 29 2010
Column k=2 of A125182.
A175342/A325545 count compositions with constant/distinct differences.

Programs

  • GAP
    List([1..100],n->Sigma(n)-Tau(n)); # Muniru A Asiru, Mar 19 2018
    
  • Maple
    with(numtheory): seq(sigma(n)-tau(n),n=1..70); # Emeric Deutsch, Dec 22 2006
  • Mathematica
    Table[DivisorSigma[1,n]-DivisorSigma[0,n], {n,100}] (* Wesley Ivan Hurt, Dec 26 2013 *)
  • PARI
    a(n) = sigma(n) - numdiv(n); \\ Harry J. Smith, Oct 23 2009
    
  • Python
    from math import prod
    from sympy import factorint
    def A065608(n):
        f = factorint(n).items()
        return prod((p**(e+1)-1)//(p-1) for p, e in f)-prod(e+1 for p,e in f) # Chai Wah Wu, Jul 16 2022

Formula

a(n) = sigma(n) - d(n) = A000203(n) - A000005(n).
a(n) = Sum_{d|n} (d-1). - Wesley Ivan Hurt, Dec 26 2013
G.f.: Sum_{k>=1} x^(2*k)/(1-x^k)^2. - Benoit Cloitre, Apr 21 2003
G.f.: Sum_{n>=1} (n-1)*x^n/(1-x^n). - Joerg Arndt, Jan 30 2011
L.g.f.: -log(Product_{k>=1} (1 - x^k)^(1-1/k)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Mar 18 2018
G.f.: Sum_{n >= 1} q^(n^2)*( (n - 1) + q^n - (n - 1)*q^(2*n) )/(1 - q^n)^2 - differentiate equation 1 in Arndt with respect to t, then set x = q and t = q. - Peter Bala, Jan 22 2021
a(n) = A342527(n) - A062968(n). - Gus Wiseman, Mar 25 2021
a(n) = n * A010054(n) - Sum_{k>=1} a(n - k*(k+1)/2), assuming a(n) = 0 for n <= 0 (Kobayashi, 2022). - Amiram Eldar, Jun 23 2023

A069916 Number of log-concave compositions (ordered partitions) of n.

Original entry on oeis.org

1, 1, 2, 4, 6, 9, 14, 20, 26, 36, 47, 60, 80, 102, 127, 159, 194, 236, 291, 355, 425, 514, 611, 718, 856, 1009, 1182, 1381, 1605, 1861, 2156, 2496, 2873, 3299, 3778, 4301, 4902, 5574, 6325, 7176, 8116, 9152, 10317, 11610, 13028, 14611, 16354, 18259, 20365
Offset: 0

Views

Author

Pontus von Brömssen, Apr 24 2002

Keywords

Comments

These are compositions with weakly decreasing first quotients, where the first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3). - Gus Wiseman, Mar 16 2021

Examples

			Out of the 8 compositions of 4, only 2+1+1 and 1+1+2 are not log-concave, so a(4)=6.
From _Gus Wiseman_, Mar 15 2021: (Start)
The a(1) = 1 through a(6) = 14 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)
       (11)  (12)   (13)    (14)     (15)
             (21)   (22)    (23)     (24)
             (111)  (31)    (32)     (33)
                    (121)   (41)     (42)
                    (1111)  (122)    (51)
                            (131)    (123)
                            (221)    (132)
                            (11111)  (141)
                                     (222)
                                     (231)
                                     (321)
                                     (1221)
                                     (111111)
(End)
		

Crossrefs

The version for differences instead of quotients is A070211.
A000005 counts constant compositions.
A000009 counts strictly increasing (or strictly decreasing) compositions.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A001055 counts factorizations.
A002843 counts compositions with adjacent parts x <= 2y.
A003238 counts chains of divisors summing to n-1, with strict case A122651.
A003242 counts anti-run compositions.
A074206 counts ordered factorizations.
A167865 counts strict chains of divisors summing to n.

Programs

  • Mathematica
    (* This program is not suitable for computing a large number of terms *)
    compos[n_] := Permutations /@ IntegerPartitions[n] // Flatten[#, 1]&;
    logConcaveQ[p_] := And @@ Table[p[[i]]^2 >= p[[i-1]]*p[[i+1]], {i, 2, Length[p]-1}]; a[n_] := Count[compos[n], p_?logConcaveQ]; Table[an = a[n]; Print["a(", n, ") = ", an]; a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 29 2016 *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],GreaterEqual@@Divide@@@Reverse/@Partition[#,2,1]&]],{n,0,15}] (* Gus Wiseman, Mar 15 2021 *)
  • Sage
    def A069916(n) : return sum(all(p[i]^2 >= p[i-1] * p[i+1] for i in range(1, len(p)-1)) for p in Compositions(n)) # Eric M. Schmidt, Sep 29 2013

A238424 Number of partitions of n without three consecutive parts in arithmetic progression.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 6, 8, 13, 13, 19, 24, 30, 36, 47, 54, 72, 85, 106, 123, 151, 178, 220, 256, 314, 362, 432, 505, 605, 692, 827, 953, 1121, 1303, 1522, 1729, 2037, 2321, 2691, 3095, 3577, 4061, 4699, 5334, 6126, 6959, 7966, 9005, 10317, 11638, 13252, 14977
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 26 2014

Keywords

Comments

Also the number of partitions of n whose first differences are an anti-run, meaning there are no adjacent equal differences. - Gus Wiseman, Mar 31 2020

Examples

			The a(8) = 13 such partitions are:
01:  [ 3 2 2 1 ]
02:  [ 3 3 1 1 ]
03:  [ 3 3 2 ]
04:  [ 4 2 1 1 ]
05:  [ 4 2 2 ]
06:  [ 4 3 1 ]
07:  [ 4 4 ]
08:  [ 5 2 1 ]
09:  [ 5 3 ]
10:  [ 6 1 1 ]
11:  [ 6 2 ]
12:  [ 7 1 ]
13:  [ 8 ]
		

Crossrefs

Cf. A238433 (partitions avoiding equidistant arithmetic progressions).
Cf. A238571 (partitions avoiding any arithmetic progression).
Cf. A238687.
The version for compositions is A238423, with strict case A325849.
The version for permutations is A295370.
The strict case is A332668.
The Heinz numbers of these partitions are the complement of A333195.
Partitions with equal differences are A049988.

Programs

  • Mathematica
    a[n_,r_,d_] := a[n,r,d] = Block[{j}, If[n == 0, 1, Sum[If[j == r+d, 0, a[n-j, j, j - r]], {j, Min[n, r]}]]]; a[n_] := a[n, 2*n+1, 0]; a /@ Range[0, 100] (* Giovanni Resta, Mar 02 2014 *)
    Table[Length[Select[IntegerPartitions[n],!MemberQ[Differences[#,2],0]&]],{n,0,30}] (* Gus Wiseman, Mar 31 2020 *)

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

A054519 Number of increasing arithmetic progressions of nonnegative integers ending in n, including those of length 1 or 2.

Original entry on oeis.org

1, 2, 4, 6, 9, 11, 15, 17, 21, 24, 28, 30, 36, 38, 42, 46, 51, 53, 59, 61, 67, 71, 75, 77, 85, 88, 92, 96, 102, 104, 112, 114, 120, 124, 128, 132, 141, 143, 147, 151, 159, 161, 169, 171, 177, 183, 187, 189, 199, 202, 208, 212, 218, 220, 228, 232, 240, 244, 248
Offset: 0

Views

Author

Henry Bottomley, Apr 07 2000

Keywords

Comments

a(0)=1, a(n) = a(n-1) + sigma_0(n) (A000005). - Ctibor O. Zizka, Nov 08 2008
a(n) is the index of the n-th term of A027750 whose value is 1. - Michel Marcus, Oct 15 2015
From Gus Wiseman, Jun 07 2019: (Start)
Also the number of subsets of {1..n} that are closed under taking the difference of two strictly decreasing terms. For example, the a(0) = 1 through a(6) = 15 subsets are:
{} {} {} {} {} {} {}
{1} {1} {1} {1} {1} {1}
{2} {2} {2} {2} {2}
{1,2} {3} {3} {3} {3}
{1,2} {4} {4} {4}
{1,2,3} {1,2} {5} {5}
{2,4} {1,2} {6}
{1,2,3} {2,4} {1,2}
{1,2,3,4} {1,2,3} {2,4}
{1,2,3,4} {3,6}
{1,2,3,4,5} {1,2,3}
{2,4,6}
{1,2,3,4}
{1,2,3,4,5}
{1,2,3,4,5,6}
(End)

Examples

			a(3)=6 because the six increasing progressions (3), (2,3), (1,2,3), (0,1,2,3), (1,3) and (0,3) all end in 3.
		

Crossrefs

Programs

  • Magma
    [1] cat [&+[Ceiling((k+1)/(i+1)): i in [1..k+1]]: k in [1..60]]; // Marius A. Burtea, Jun 10 2019
  • Maple
    IBI:= {{}}: a[0]:= 1: for n from 1 to 45 do IBI:= IBI union map(t -> t union {n}, select(t -> (t minus map(q -> n-q, t)={}), IBI)); a[n]:= nops(IBI) od: seq(a[n], n=0..45); # Zerinvary Lajos, Mar 18 2007
    with(numtheory):a[1]:=2: for n from 2 to 59 do a[n]:=a[n-1]+tau(n) od: seq(a[n], n=0..45); # Zerinvary Lajos, Mar 21 2009
    map(`+`, ListTools:-PartialSums(map(numtheory:-tau, [$0..1000])),1); # Robert Israel, Oct 15 2015
  • Mathematica
    a[0]=1; a[n_] := a[n] = a[n-1] + DivisorSigma[0, n]; Table[a[n], {n, 0, 45}] (* Jean-François Alcover, Oct 05 2012, after Ctibor O. Zizka *)
    nxt[{n_,a_}]:={n+1,a+DivisorSigma[0,n+1]}; Transpose[NestList[nxt,{0,1},50]][[2]] (* Harvey P. Dale, Oct 15 2012 *)
    Table[Length[Select[Subsets[Range[n]],SubsetQ[#,Subtract@@@Reverse/@Subsets[#,{2}]]&]],{n,0,10}] (* Gus Wiseman, Jun 07 2019 *)
  • PARI
    vector(100, n, n--; sum(k=1, n, n\k) + 1) \\ Altug Alkan, Oct 15 2015
    

Formula

a(n) = A051336(n+1) - A051336(n) = a(n-1) + A000005(n) = A006218(n)+1.
G.f.: (1-x)^(-1) * (1 + Sum_{j>=1} x^j/(1-x^j)). - Robert Israel, Oct 15 2015
a(n) = Sum_{i=1..n+1} ceiling((n+1)/(i+1)). - Wesley Ivan Hurt, Sep 15 2017

A342528 Number of compositions with alternating parts weakly decreasing (or weakly increasing).

Original entry on oeis.org

1, 1, 2, 4, 7, 12, 20, 32, 51, 79, 121, 182, 272, 399, 582, 839, 1200, 1700, 2394, 3342, 4640, 6397, 8771, 11955, 16217, 21878, 29386, 39285, 52301, 69334, 91570, 120465, 157929, 206313, 268644, 348674, 451185, 582074, 748830, 960676, 1229208, 1568716, 1997064
Offset: 0

Views

Author

Gus Wiseman, Mar 24 2021

Keywords

Comments

These are finite sequences q of positive integers summing to n such that q(i) >= q(i+2) for all possible i.
The strict case (alternating parts are strictly decreasing) is A000041. Is there a bijective proof?
Yes. Construct a Ferrers diagram by placing odd parts horizontally and even parts vertically in a fishbone pattern. The resulting Ferrers diagram will be for an ordinary partition and the process is reversible. It does not appear that this method can be applied to give a formula for this sequence. - Andrew Howroyd, Mar 25 2021

Examples

			The a(1) = 1 through a(6) = 20 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)
       (11)  (12)   (13)    (14)     (15)
             (21)   (22)    (23)     (24)
             (111)  (31)    (32)     (33)
                    (121)   (41)     (42)
                    (211)   (131)    (51)
                    (1111)  (212)    (141)
                            (221)    (222)
                            (311)    (231)
                            (1211)   (312)
                            (2111)   (321)
                            (11111)  (411)
                                     (1212)
                                     (1311)
                                     (2121)
                                     (2211)
                                     (3111)
                                     (12111)
                                     (21111)
                                     (111111)
		

Crossrefs

The even-length case is A114921.
The version with alternating parts unequal is A224958 (unordered: A000726).
The version with alternating parts equal is A342527.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A000203 adds up divisors.
A002843 counts compositions with all adjacent parts x <= 2y.
A003242 counts anti-run compositions.
A069916/A342492 = decreasing/increasing first quotients.
A070211/A325546 = weakly decreasing/increasing differences.
A175342/A325545 = constant/distinct differences.
A342495 = constant first quotients (unordered: A342496, strict: A342515, ranking: A342522).

Programs

  • Maple
    b:= proc(n, i, j) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1, j)+b(n-i, min(n-i, j), min(n-i, i))))
        end:
    a:= n-> b(n$3):
    seq(a(n), n=0..42);  # Alois P. Heinz, Jan 16 2025
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],GreaterEqual@@Plus@@@Reverse/@Partition[#,2,1]&]],{n,0,15}]
  • PARI
    seq(n)={my(p=1/prod(k=1, n, 1-y*x^k + O(x*x^n))); Vec(1+sum(k=1, n, polcoef(p,k,y)*(polcoef(p,k-1,y) + polcoef(p,k,y))))} \\ Andrew Howroyd, Mar 24 2021

Formula

G.f.: Sum_{k>=0} ([y^k] P(x,y))*([y^k] (1 + y)*P(x,y)), where P(x,y) = Product_{k>=1} 1/(1 - y*x^k). - Andrew Howroyd, Jan 16 2025

Extensions

Terms a(21) and beyond from Andrew Howroyd, Mar 24 2021

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