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.

Previous Showing 11-20 of 53 results. Next

A060831 a(n) = Sum_{k=1..n} (number of odd divisors of k) (cf. A001227).

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 9, 11, 12, 15, 17, 19, 21, 23, 25, 29, 30, 32, 35, 37, 39, 43, 45, 47, 49, 52, 54, 58, 60, 62, 66, 68, 69, 73, 75, 79, 82, 84, 86, 90, 92, 94, 98, 100, 102, 108, 110, 112, 114, 117, 120, 124, 126, 128, 132, 136, 138, 142, 144, 146, 150, 152, 154, 160
Offset: 0

Views

Author

Henry Bottomley, May 01 2001

Keywords

Comments

The old definition was "Number of sums less than or equal to n of sequences of consecutive positive integers (including sequences of length 1)."
In other words, a(n) is also the total number of partitions of all positive integers <= n into consecutive parts, n >= 1. - Omar E. Pol, Dec 03 2020
Starting with 1 = row sums of triangle A168508. - Gary W. Adamson, Nov 27 2009
The subsequence of primes in this sequence begins, through a(100): 2, 5, 7, 11, 17, 19, 23, 29, 37, 43, 47, 73, 79, 173, 181, 223, 227, 229, 233, 263. - Jonathan Vos Post, Feb 13 2010
Apart from the initial zero, a(n) is also the total number of subparts of the symmetric representations of sigma of all positive integers <= n. Hence a(n) is also the total number of subparts in the terraces of the stepped pyramid with n levels described in A245092. For more information see A279387 and A237593. - Omar E. Pol, Dec 17 2016
a(n) is also the total number of partitions of all positive integers <= n into an odd number of equal parts. - Omar E. Pol, May 14 2017
Zero together with the row sums of A235791. - Omar E. Pol, Dec 18 2020

Examples

			E.g., for a(7), we consider the odd divisors of 1,2,3,4,5,6,7, which gives 1,1,2,1,2,2,2 = 11. - _Jon Perry_, Mar 22 2004
Example illustrating the old definition: a(7) = 11 since 1, 2, 3, 4, 5, 6, 7, 1+2, 2+3, 3+4, 1+2+3 are all 7 or less.
From _Omar E. Pol_, Dec 02 2020: (Start)
Illustration of initial terms:
                              Diagram
   n   a(n)
   0     0                          _|
   1     1                        _|1|
   2     2                      _|1 _|
   3     4                    _|1  |1|
   4     5                  _|1   _| |
   5     7                _|1    |1 _|
   6     9              _|1     _| |1|
   7    11            _|1      |1  | |
   8    12          _|1       _|  _| |
   9    15        _|1        |1  |1 _|
  10    17      _|1         _|   | |1|
  11    19    _|1          |1   _| | |
  12    21   |1            |   |1  | |
...
a(n) is also the total number of horizontal line segments in the first n levels of the diagram. For n = 5 there are seven horizontal line segments, so a(5) = 7. Cf. A237048, A286001. (End)
From _Omar E. Pol_, Dec 19 2020: (Start)
a(n) is also the number of regions in the diagram of the symmetries of sigma after n stages, including the subparts, as shown below (Cf. A279387):
.                                                         _ _ _ _
.                                           _ _ _        |_ _ _  |_
.                               _ _ _      |_ _ _|       |_ _ _| |_|_
.                     _ _      |_ _  |_    |_ _  |_ _    |_ _  |_ _  |
.             _ _    |_ _|_    |_ _|_  |   |_ _|_  | |   |_ _|_  | | |
.       _    |_  |   |_  | |   |_  | | |   |_  | | | |   |_  | | | | |
.      |_|   |_|_|   |_|_|_|   |_|_|_|_|   |_|_|_|_|_|   |_|_|_|_|_|_|
.
.  0    1      2        4          5            7              9
(End)
		

Crossrefs

Zero together with the partial sums of A001227.

Programs

  • Maple
    A060831 := proc(n)
        add(numtheory[tau](n-i+1),i=1..ceil(n/2)) ;
    end proc:
    seq(A060831(n),n=0..100) ; # Wesley Ivan Hurt, Oct 02 2013
  • Mathematica
    f[n_] := Sum[ -(-1^k)Floor[n/(2k - 1)], {k, n}]; Table[ f[n], {n, 0, 65}] (* Robert G. Wilson v, Jun 16 2006 *)
    Accumulate[Table[Count[Divisors[n],?OddQ],{n,0,70}]] (* _Harvey P. Dale, Nov 26 2023 *)
  • PARI
    a(n)=local(c);c=0;for(i=1,n,c+=sumdiv(i,X,X%2));c
    
  • PARI
    for (n=0, 1000, s=n; d=3; while (n>=d, s+=n\d; d+=2); write("b060831.txt", n, " ", s); ) \\ Harry J. Smith, Jul 12 2009
    
  • PARI
    a(n)=my(n2=n\2); sum(k=1, sqrtint(n), n\k)*2-sqrtint(n)^2-sum(k=1, sqrtint(n2), n2\k)*2+sqrtint(n2)^2 \\ Charles R Greathouse IV, Jun 18 2015
    
  • Python
    def A060831(n): return n+sum(n//i for i in range(3,n+1,2)) # Chai Wah Wu, Jul 16 2022
    
  • Python
    from math import isqrt
    def A060831(n): return ((t:=isqrt(m:=n>>1))+(s:=isqrt(n)))*(t-s)+(sum(n//k for k in range(1,s+1))-sum(m//k for k in range(1,t+1))<<1) # Chai Wah Wu, Oct 23 2023

Formula

a(n) = Sum_{i=1..n} A001227(i).
a(n) = a(n-1) + A001227(n).
a(n) = n + floor(n/3) + floor(n/5) + floor(n/7) + floor(n/9) + ...
a(n) = A006218(n) - A006218(floor(n/2)).
a(n) = Sum_{i=1..ceiling(n/2)} A000005(n-i+1). - Wesley Ivan Hurt, Sep 30 2013
a(n) = Sum_{i=floor((n+2)/2)..n} A000005(i). - N. J. A. Sloane, Dec 06 2020, modified by Xiaohan Zhang, Nov 07 2022
G.f.: (1/(1 - x))*Sum_{k>=1} x^k/(1 - x^(2*k)). - Ilya Gutkovskiy, Dec 23 2016
a(n) ~ n*(log(2*n) + 2*gamma - 1) / 2, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 30 2019

Extensions

Definition simplified by N. J. A. Sloane, Dec 05 2020

A211343 Triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists the positive integers interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 05 2013

Keywords

Comments

The number of positive terms in row n is A001227(n).
If n = 2^j then the only positive integer in row n is T(n,1) = n
If n is an odd prime then the only two positive integers in row n are T(n,1) = n and T(n,2) = (n - 1)/2.
From Omar E. Pol, Apr 30 2017: (Start)
Conjecture 1: T(n,k) is the smallest part of the partition of n into k consecutive parts, if T(n,k) > 0.
Conjecture 2: the last positive integer in the row n is in the column A109814(n). (End)

Examples

			Triangle begins:
   1;
   2;
   3,  1;
   4,  0;
   5,  2;
   6,  0,  1;
   7,  3,  0;
   8,  0,  0;
   9,  4,  2;
  10,  0,  0,  1;
  11,  5,  0,  0;
  12,  0,  3,  0;
  13,  6,  0,  0;
  14,  0,  0,  2;
  15,  7,  4,  0,  1;
  16,  0,  0,  0,  0;
  17,  8,  0,  0,  0;
  18,  0,  5,  3,  0;
  19,  9,  0,  0,  0;
  20,  0,  0,  0,  2;
  21, 10,  6,  0,  0,  1;
  22,  0,  0,  4,  0,  0;
  23, 11,  0,  0,  0,  0;
  24,  0,  7,  0,  0,  0;
  25, 12,  0,  0,  3,  0;
  26,  0,  0,  5,  0,  0;
  27, 13,  8,  0,  0,  2;
  28,  0,  0,  0,  0,  0,  1;
  ...
In accordance with the conjectures, for n = 15 there are four partitions of 15 into consecutive parts: [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1]. The smallest parts of these partitions are 15, 7, 4, 1, respectively, so the 15th row of the triangle is [15, 7, 4, 0, 1]. - _Omar E. Pol_, Apr 30 2017
		

Crossrefs

Columns 1-3: A000027, A027656, A175676.
Column k starts in row A000217(k).
Row n has length A003056(n).

Programs

  • Mathematica
    a196020[n_, k_]:=If[Divisible[n - k(k + 1)/2, k], 2n/k - k, 0]; T[n_, k_]:= Floor[(1 + a196020[n, k])/2]; Table[T[n, k], {n, 28}, {k, Floor[(Sqrt[8n+1]-1)/2]}] // Flatten (* Indranil Ghosh, Apr 30 2017 *)
  • Python
    from sympy import sqrt
    import math
    def a196020(n, k):return 2*n/k - k if (n - k*(k + 1)/2)%k == 0 else 0
    def T(n, k): return int((1 + a196020(n, k))/2)
    for n in range(1, 29): print([T(n, k) for k in range(1, int((sqrt(8*n + 1) - 1)/2) + 1)]) # Indranil Ghosh, Apr 30 2017

Formula

T(n,k) = floor((1 + A196020(n,k))/2).
T(n,k) = A237048(n,k)*A286001(n,k). - Omar E. Pol, Aug 13 2018

A335616 a(n) is twice the number of partitions of n into consecutive parts, minus the number of partitions of n into consecutive parts that contain 1 as a part.

Original entry on oeis.org

1, 2, 3, 2, 4, 3, 4, 2, 6, 3, 4, 4, 4, 4, 7, 2, 4, 6, 4, 4, 7, 4, 4, 4, 6, 4, 8, 3, 4, 8, 4, 2, 8, 4, 8, 5, 4, 4, 8, 4, 4, 8, 4, 4, 11, 4, 4, 4, 6, 6, 8, 4, 4, 8, 7, 4, 8, 4, 4, 8, 4, 4, 12, 2, 8, 7, 4, 4, 8, 8, 4, 6, 4, 4, 12, 4, 8, 7, 4, 4, 10, 4, 4, 8, 8, 4, 8, 4, 4, 12, 7, 4, 8, 4, 8, 4, 4, 6, 12, 6
Offset: 1

Views

Author

Omar E. Pol, Oct 02 2020

Keywords

Comments

a(n) is twice the number of partitions of n into consecutive parts, minus the number of partitions of n into distinct parts such that the greatest part equals the number of all parts.
For a visualization of the sequence, consider a diagram formed for infinitely many double staircases as shown in the Example section.
a(n) is the number of horizontal line segments (or steps) that are only in the n-th level of the structure, starting from the top.
The total length of all vertical line segments that are adjacent and below the steps of the n-th level of the structure equals twice the total number of parts in all partitions of n into consecutive parts.
Note that in the n-th double staircase the top step is located in the level A000217(n), n >= 1, every horizontal line segment has length 1, and every vertical line segment has length n.
a(n) is also the number of horizontal line segments of length 1 or 2 in the n-th level of the similar diagram used to represent the sequence A237593 and other isosceles triangles related to A237593.
a(n) is odd if and only if n is a nonzero triangular number (A000217).
Double-staircases theorem of the sum of divisors: the total number of steps from level n to the top of all the odd-indexed double staircases that have at least one step in the level n, minus the total number of steps from the level n to the top of all the even-indexed double staircases that have at least one step in the level n equals sigma(n) = A000203(n).
The above theorem shows a symmetry of sigma in accordance with the symmetric Dyck Paths described in A237593 and with the pyramid described in A245092.
For the connection with the partitions into consecutive integers see also A196020, since we can see here that A196020(n,k) is also the number of steps in the first n levels of the k-th double staircase that has at least one step in the n-th level of the diagram, otherwise A196020(n,k) = 0. Also, it is the width of the mentioned staircase in n-th level of the diagram.
It appears that odd primes (A065091) are also the levels where there are steps in the staircases 1 and 2, but no step from other staircases.
It appears that powers of 2 (A000079) are also the levels where there are only one or two steps in total.
This sequence could be related to several other sequences (see the Crossrefs section of A262626).

Examples

			Illustration of initial terms:
n   a(n)                               Diagram
                                          _
1     1                                 _|1|_
2     2                               _|1 _ 1|_
3     3                             _|1  |1|  1|_
4     2                           _|1   _| |_   1|_
5     4                         _|1    |1 _ 1|    1|_
6     3                       _|1     _| |1| |_     1|_
7     4                     _|1      |1  | |  1|      1|_
8     2                   _|1       _|  _| |_  |_       1|_
9     6                 _|1        |1  |1 _ 1|  1|        1|_
10    3               _|1         _|   | |1| |   |_         1|_
11    4             _|1          |1   _| | | |_   1|          1|_
12    4           _|1           _|   |1  | |  1|   |_           1|_
13    4         _|1            |1    |  _| |_  |    1|            1|_
14    4       _|1             _|    _| |1 _ 1| |_    |_             1|_
15    7     _|1              |1    |1  | |1| |  1|    1|              1|_
16    2    |1                |     |   | | | |   |     |                1|
...
For n = 6 (above), the total number of steps in all double staircases that have at least one step in the 6th level of the structure is equal to 3, since there are two steps in the first double staircase, there are no steps in the second double staircase, and there is only one step in the third double staircase, so a(3) = 2 + 0 + 1 = 3.
From the theorem (see comments) for n = 6, let s(k) = A196020(6,k) be the total number of steps from level n to the top, in the k-th double staircase that has at least a step in the 6th level of the structure, otherwise s(k) = 0. We have that s(1) = 11, s(2) = 0 and s(3) = 1. So the alternating sum is 11 - 0 + 1 = 12, which equals sigma(6) = 1 + 2 + 3 + 6 = 12.
Note that to evaluate sigma(n), it is sufficient to have only the n-th level of the diagram, since the width of the base level of a double staircase equals the number of its steps. See below:
For n = 6 the 6th level of the above diagram looks like this:
                                _         _         _
                               |1      | |1| |      1|
.
Width of the 1st staircase:    |<-------- 11 ------->|
.
Width of the 3rd staircase:          --->|1|<---
.
The width of the first double staircase is 11, the width of the second double staircase does not count, and the width of the third double staircase is 1, so the alternating sum is 11 - 0 + 1 = 12 = sigma(6).
For n = 15 the alternating sum is 29 - 13 + 7 - 0 + 1 = 24 = sigma(15).
For n = 16 the alternating sum is 31 -  0 + 0 - 0 + 0 = 31 = sigma(16).
For more information about these alternating sums see A196020.
		

Crossrefs

Programs

  • Maple
    N:= 100:
    S := convert(series( add( x^(n*(n+1)/2)*(1 + x^n)/(1 - x^n), n = 1..floor(sqrt(2*N)) ), x, N+1 ), polynom):
    seq(coeff(S, x, n), n = 1..N); # Peter Bala, Jan 20 2021
  • Mathematica
    A335616[n_]:=2DivisorSigma[0,n/2^IntegerExponent[n,2]]-Boole[IntegerQ[(Sqrt[8n+1]-1)/2]];Array[A335616,100] (* Paolo Xausa, Sep 03 2023 *)

Formula

a(n) = 2*A001227(n) - A010054(n).
a(n) = A054844(n) - A010054(n).
a(n) = 2*A136107(n) + A010054(n). - Omar E. Pol, Nov 27 2020
G.f.: Sum_{n >= 1} x^(n*(n+1)/2)*(1 + x^n)/(1 - x^n). Cf. A000005 with g.f. Sum_{n >= 1} x^(n^2)*(1 + x^n)/(1 - x^n). - Peter Bala, Jan 20 2021

Extensions

Simpler definition from Omar E. Pol, Nov 27 2020

A239657 Number of odd divisors m of n such that there is a divisor d of n with d < m < 2*d.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1, 0, 3, 0, 0, 3, 0, 0, 1, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 3, 0, 0, 1, 0, 0, 3, 0, 0, 0, 1, 0, 2, 0, 0, 2, 0, 1, 2, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 5, 1, 0, 0, 0, 0, 1, 0, 0, 1, 2, 0, 2, 0, 1, 4, 0, 0, 3, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 5, 0, 0
Offset: 1

Views

Author

Omar E. Pol, Mar 23 2014

Keywords

Comments

The original name was: Number of odd divisors of n minus the number of parts in the symmetric representation of sigma(n).
Observation: at least the indices of the first 42 positive elements coincide with A005279: 6, 12, 15, 18, 20, 24..., checked (by hand) up to n = 2^7.
The observation is true for the indices of all positive elements. Hence the indices of the zeros give A174905. - Omar E. Pol, Jan 06 2017
a(n) is the number of subparts minus the number of parts in the symmetric representation of sigma(n). For the definition of "subpart" see A279387. - Omar E. Pol, Sep 26 2018
a(n) is the number of subparts of the symmetric representation of sigma(n) that are not in the first layer. - Omar E. Pol, Jan 26 2025

Examples

			Illustration of the symmetric representation of sigma(15) = 24 in the third quadrant:
.      _
.     | |
.     | |
.     | |
.     | |
.     | |
.     | |
.     | |
.     |_|_ _ _
.    8      | |_ _
.           |_    |
.             |_  |_
.            8  |_ _|
.                   |
.                   |_ _ _ _ _ _ _ _
.                   |_ _ _ _ _ _ _ _|
.                 8
.
For n = 15 the divisors of 15 are 1, 3, 5, 15, so the number of odd divisors of 15 is equal to 4. On the other hand the parts of the symmetric representation of sigma(15) are [8, 8, 8], there are three parts, so a(15) = 4 - 3 = 1.
From _Omar E. Pol_, Sep 26 2018: (Start)
Also the number of odd divisors of 15 equals the number of partitions of 15 into consecutive parts and equals the number of subparts in the symmetric representation of sigma(15). Then we have that the number of subparts minus the number of parts is  4 - 3 = 1, so a(15) = 1.
.      _
.     | |
.     | |
.     | |
.     | |
.     | |
.     | |
.     | |
.     |_|_ _ _
.    8      | |_ _
.           |_ _  |
.          7  |_| |_
.            1  |_ _|
.                   |
.                   |_ _ _ _ _ _ _ _
.                   |_ _ _ _ _ _ _ _|
.                 8
.
The above diagram shows the symmetric representation of sigma(15) with its four subparts: [8, 7, 1, 8]. (End)
From _Omar E. Pol_, Mar 30 2025: (Start)
The above diagram also shows that in the first layer there are three parts (having sizes [8, 7, 8]). Also there is another part that is not in the first layer, so a(15) = 1.
On the other hand for n = 15 there is only one odd divisor m of 15 such that  d < m < 2*d and d divides 15. That odd divisor is 5 as shown below, so a(15) = 1.
   d  <  m  <  2*d
--------------------
   1            2
   3     5      6
   5           10
  15           30
.
For n = 18 there are two odd divisors m of 18 such that  d < m < 2*d and d divides 18. Those odd divisors are 3 and 9 as shown below, so a(18) = 2.
   d  <  m  <  2*d
--------------------
   1            2
   2     3      4
   3            6
   6     9     12
   9           18
  18           36
.
(End)
		

Crossrefs

Programs

Formula

a(n) = A001227(n) - A237271(n).

Extensions

New Name from Omar E. Pol, Jan 26 2025

A341971 Irregular triangle read by rows in which row n lists the values in row n of A235791 whose indices are in row n of A341970; a number is signed when its index is even.

Original entry on oeis.org

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

Views

Author

Hartmut F. W. Hoft, Feb 24 2021

Keywords

Comments

Row n has length A001227(n), the number of odd divisors of n, and also the number of entries in row n of A341970.
Let 1 <= n, 1 <= d <= A001227(n) and k = A341970(A060831(n-1) + d). Expression s(n, k) = r*n - r*(r+1)*(r+2)/6 + k with r = floor((sqrt(8*n + 1) - 1)/2) translates position (row n, column k) in the triangle of A235791 to its position in sequence A235791.
The absolute values in row n are the smallest parts of the partitions of n into consecutive parts (with the partitions ordered by increasing number of parts). - Omar E. Pol, Dec 31 2024

Examples

			Triangle begins:
   1
   2
   3  -1
   4
   5  -2
   6   1
   7  -3
   8
   9  -4   2
  10  -1
  11  -5
  12   3
  13  -6
  14  -2
  15  -7   4   1
  16
  17  -8
  18   5  -3
  19  -9
  20   2
  21 -10   6  -1
...
a(26)..a(29) = { 15, -7, 4, 1 } is row 15 in this sequence with corresponding row 15 { 1, 1, 1, 0, 1 } in A237048. The sum 15 - 7 = 8 represents the first (complete) part of the symmetric representation of sigma(15), while 4 gives to incomplete bottom subpart of the central part and 1 the complete subpart of the second layer on the diagonal of the central part. Because of the double counting on the diagonal the completed subparts of the symmetric central part have size 7 and 1 respectively, see A280851, so that the parts of the symmetric representation of sigma(15) are (8, 8, 8).
a(40)..a(43) = { 21, -10, 6, -1 } is row 21 in this sequence with corresponding row 21 { 1, 1, 1, 0, 0, 1 } in A237048. The sums 21 - 10 = 11 and 6 - 1 = 5 denote the sizes of the two (complete) parts of width 1 of the symmetric representation of sigma(21) up to the diagonal resulting in the four parts ( 11, 5, 5, 11 ).
		

Crossrefs

Programs

  • Mathematica
    (* Function a341970[ ] is defined in A341970 *)
    widthL[n_] := Rest[FoldList[#1+If[OddQ[#2], +1, -1]&, 0, a341970[n]]]
    sT[n_] := Map[(-1)^(#+1) Ceiling[(n+1)/# - (#+1)/2]&, a341970[n]]
    a341971[n_] := Flatten[Map[sT, Range[n]]]
    a341971[31] (* first 31 rows of table *)

Formula

a(A060831(n-1) + d) = T(n,d) = (-1)^(k+1)*A235791(s(n, k)).

A231347 Triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists the odd numbers interleaved with k-1 zeros but T(n,1) = n - 1 and the first element of column k is in row k(k+1)/2.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Dec 28 2013

Keywords

Comments

Alternating sum of row n equals the sum of aliquot divisors of n, i.e., sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A001065(n).
Row n has length A003056(n).
Column k starts in row A000217(k).
The number of positive terms in row n is A001227(n), for n >= 2.
If n = 2^j then the only positive integer in row n is T(n,1) = n - 1, for j >= 1.
If n is an odd prime then the only two positive integers in row n are T(n,1) = n - 1 and T(n,2) = n - 2.

Examples

			Triangle begins:
  0;
  1;
  2,   1;
  3,   0;
  4,   3;
  5,   0,  1;
  6,   5,  0;
  7,   0,  0;
  8,   7,  3;
  9,   0,  0,  1;
  10,  9,  0,  0;
  11,  0,  5,  0;
  12, 11,  0,  0;
  13,  0,  0,  3;
  14, 13,  7,  0,  1;
  15,  0,  0,  0,  0;
  16, 15,  0,  0,  0;
  17,  0,  9,  5,  0;
  18, 17,  0,  0,  0;
  19,  0,  0,  0,  3;
  20, 19, 11,  0,  0,  1;
  21,  0,  0,  7,  0,  0;
  22, 21,  0,  0,  0,  0;
  23,  0, 13,  0,  0,  0;
  ...
For n = 15 the aliquot divisors of 15 are 1, 3, 5, therefore the sum of aliquot divisors of 15 is 1 + 3 + 5 = 9. On the other hand the 15th row of triangle is 14, 13, 7, 0, 1, hence the alternating row sum is 14 - 13 + 7 - 0 + 1 = 9, equalling the sum of aliquot divisors of 15.
If n is even then the alternating sum of the n-th row of triangle is simpler than the sum of aliquot divisors of n. Example: the sum of aliquot divisors of 24 is 1 + 2 + 3 + 4 + 6 + 8 + 12 = 36, and the alternating sum of the 24th row of triangle is 23 - 0 + 13 - 0 + 0 - 0 = 36.
		

Crossrefs

Formula

T(n,1) = n - 1.
T(n,k) = A196020(n,k), for k >= 2.

A266531 Square array read by antidiagonals upwards: T(n,k) = n-th number with k odd divisors.

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 8, 6, 18, 15, 16, 7, 25, 21, 81, 32, 10, 36, 27, 162, 45, 64, 11, 49, 30, 324, 63, 729, 128, 12, 50, 33, 625, 75, 1458, 105, 256, 13, 72, 35, 648, 90, 2916, 135, 225, 512, 14, 98, 39, 1250, 99, 5832, 165, 441, 405, 1024, 17, 100, 42, 1296, 117, 11664, 189, 450, 567, 59049, 2048, 19, 121, 51, 2401, 126, 15625
Offset: 1

Views

Author

Omar E. Pol, Apr 02 2016

Keywords

Comments

T(n,k) is the n-th positive integer with exactly k odd divisors.
This is a permutation of the natural numbers.
T(n,k) is also the n-th number j with the property that the symmetric representation of sigma(j) has k subparts (cf. A279387). - Omar E. Pol, Dec 27 2016
T(n,k) is also the n-th positive integer with exactly k partitions into consecutive parts. - Omar E. Pol, Aug 16 2018

Examples

			The corner of the square array begins:
    1,  3,  9, 15,   81,  45,   729, 105,  225,  405, ...
    2,  5, 18, 21,  162,  63,  1458, 135,  441,  567, ...
    4,  6, 25, 27,  324,  75,  2916, 165,  450,  810, ...
    8,  7, 36, 30,  625,  90,  5832, 189,  882,  891, ...
   16, 10, 49, 33,  648,  99, 11664, 195,  900, 1053, ...
   32, 11, 50, 35, 1250, 117, 15625, 210, 1089, 1134, ...
   64, 12, 72, 39, 1296, 126, 23328, 231, 1225, 1377, ...
  128, 13, 98, 42, 2401, 147, 31250, 255, 1521, 1539, ...
  ...
		

Crossrefs

A328365 Irregular triangle read by rows, T(n,k), n >= 1, k >= 1, in which row n lists in reverse order the partitions of n into consecutive parts.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Oct 22 2019

Keywords

Comments

For m >= 0, row 2^m consists of just one element (2^m). - Paolo Xausa, May 24 2025

Examples

			Triangle begins:
  [1];
  [2];
  [1, 2], [3];
  [4];
  [2, 3], [5];
  [1, 2, 3], [6];
  [3, 4], [7];
  [8];
  [2, 3, 4], [4, 5], [9];
  [1, 2, 3, 4], [10];
  [5, 6], [11];
  [3, 4, 5], [12];
  [6, 7], [13];
  [2, 3, 4, 5], [14];
  [1, 2, 3, 4, 5], [4, 5, 6], [7, 8], [15];
  [16];
  [8, 9], [17];
  [3, 4, 5, 6], [5, 6, 7], [18];
  [9, 10], [19];
  [2, 3, 4, 5, 6], [20];
  [1, 2, 3, 4, 5, 6], [6, 7, 8], [10, 11], [21];
  [4, 5, 6, 7], [22];
  [11, 12], [23];
  [7, 8, 9], [24];
  [3, 4, 5, 6, 7], [12, 13], [25];
  [5, 6, 7, 8], [26];
  [2, 3, 4, 5, 6, 7], [8, 9, 10], [13, 14], [27];
  [1, 2, 3, 4, 5, 6, 7], [28];
  ...
For n = 9 there are three partitions of 9 into consecutive parts, they are [9], [5, 4], [4, 3, 2], so the 9th row of triangle is [2, 3, 4], [4, 5], [9].
Note that in the below diagram the number of horizontal line segments in the n-th row equals A001227(n), the number of partitions of n into consecutive parts, so we can find the partitions of n into consecutive parts as follows: consider the vertical blocks of numbers that start exactly in the n-th row of the diagram, for example: for n = 15 consider the vertical blocks of numbers that start exactly in the 15th row. They are [1, 2, 3, 4, 5], [4, 5, 6], [7, 8], [15], equaling the 15th row of the above triangle.
Row        _
  1       |1|_
  2       |_ 2|_
  3       |1|  3|_
  4       |2|_   4|_
  5       |_ 2|    5|_
  6       |1|3|_     6|_
  7       |2|  3|      7|_
  8       |3|_ 4|_       8|_
  9       |_ 2|  4|        9|_
  10      |1|3|  5|_        10|_
  11      |2|4|_   5|         11|_
  12      |3|  3|  6|_          12|_
  13      |4|_ 4|    6|           13|_
  14      |_ 2|5|_   7|_            14|_
  15      |1|3|  4|    7|             15|_
  16      |2|4|  5|    8|_              16|_
  17      |3|5|_ 6|_     8|               17|_
  18      |4|  3|  5|    9|_                18|_
  19      |5|_ 4|  6|      9|                 19|_
  20      |_ 2|5|  7|_    10|_                  20|_
  21      |1|3|6|_   6|     10|                   21|_
  22      |2|4|  4|  7|     11|_                    22|_
  23      |3|5|  5|  8|_      11|                     23|_
  24      |4|6|_ 6|    7|     12|_                      24|_
  25      |5|  3|7|_   8|       12|                       25|_
  26      |6|_ 4|  5|  9|_      13|_                        26|_
  27      |_ 2|5|  6|    8|       13|                         27|_
  28      |1|3|6|  7|    9|       14|                           28|
  ...
The diagram is infinite. For more information about the diagram see A286001.
For an amazing connection with sum of divisors function (A000203) see A237593.
		

Crossrefs

Mirror of A299765.
Row n has length A204217(n).
Row sums give A245579.
Column 1 gives A118235.
Right border gives A000027.
Records give A000027.
Where records occur gives A285899.
The number of partitions into consecutive parts in row n is A001227(n).
For tables of partitions into consecutive parts see A286000 and A286001.

Programs

  • Mathematica
    Table[With[{h = Floor[n/2] - Boole[EvenQ@ n]},Append[Array[Which[Total@ # == n, #, Total@ Most@ # == n, Most[#], True, Nothing] &@ NestWhile[Append[#, #[[-1]] + 1] &, {#}, Total@ # <= n &, 1, h - # + 1] &, h], {n}]], {n, 24}] // Flatten (* Michael De Vlieger, Oct 22 2019 *)

A328361 Triangle read by rows: T(n,k) is the total number of k's in all partitions of n into consecutive parts, (1 <= k <= n).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Omar E. Pol, Oct 20 2019

Keywords

Comments

Iff n is a power of 2 (A000079) then row n lists n - 1 zeros together with 1.
Iff n is an odd prime (A065091) then row n lists (n - 3)/2 zeros, 1, 1, (n - 3)/2 zeros, 1.

Examples

			Triangle begins:
1;
0, 1;
1, 1, 1;
0, 0, 0, 1;
0, 1, 1, 0, 1;
1, 1, 1, 0, 0, 1;
0, 0, 1, 1, 0, 0, 1;
0, 0, 0, 0, 0, 0, 0, 1;
0, 1, 1, 2, 1, 0, 0, 0, 1;
1, 1, 1, 1, 0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1;
0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1;
0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1;
1, 1, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
...
For n = 9 there are three partitions of 9 into consecutive parts, they are [9], [5, 4], [4, 3, 2], so the 9th row of triangle is [0, 1, 1, 2, 1, 0, 0, 0, 1].
		

Crossrefs

Row sums give A204217.
Column 1 gives A010054, n >= 1.
Leading diagonal gives A000012.

A334466 Square array read by antidiagonals upwards: T(n,k) is the total number of parts in all partitions of n into consecutive parts that differ by k, with n >= 1, k >= 0.

Original entry on oeis.org

1, 3, 1, 4, 1, 1, 7, 3, 1, 1, 6, 1, 1, 1, 1, 12, 3, 3, 1, 1, 1, 8, 4, 1, 1, 1, 1, 1, 15, 3, 3, 3, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 18, 6, 3, 3, 3, 1, 1, 1, 1, 1, 12, 5, 4, 1, 1, 1, 1, 1, 1, 1, 1, 28, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 14, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 24, 3, 6, 3, 3, 3, 3, 1
Offset: 1

Views

Author

Omar E. Pol, May 01 2020

Keywords

Comments

The one-part partition n = n is included in the count.
The column k is related to (k+2)-gonal numbers, assuming that 2-gonals are the nonnegative numbers, 3-gonals are the triangular numbers, 4-gonals are the squares, 5-gonals are the pentagonal numbers, and so on.
Note that the number of parts for T(n,0) = A000203(n), equaling the sum of the divisors of n.
For fixed k>0, Sum_{j=1..n} T(j,k) ~ 2^(3/2) * n^(3/2) / (3*sqrt(k)). - Vaclav Kotesovec, Oct 23 2024

Examples

			Square array starts:
   n\k|   0  1  2  3  4  5  6  7  8  9 10 11 12
   ---+---------------------------------------------
   1  |   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   2  |   3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   3  |   4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   4  |   7, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   5  |   6, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   6  |  12, 4, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, ...
   7  |   8, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, ...
   8  |  15, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, ...
   9  |  13, 6, 4, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, ...
  10  |  18, 5. 3. 1. 3. 1, 3, 1, 3, 1, 1, 1, 1, ...
  11  |  12, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 1, ...
  12  |  28, 4, 6, 4, 3, 1, 3, 1, 3, 1, 3, 1, 1, ...
  ...
For n = 9 we have that:
For k = 0 the partitions of 9 into consecutive parts that differ by 0 (or simply: the partitions of 9 into equal parts) are [9], [3,3,3], [1,1,1,1,1,1,1,1,1]. In total there are 13 parts, so T(9,0) = 13.
For k = 1 the partitions of 9 into consecutive parts that differ by 1 (or simply: the partitions of 9 into consecutive parts) are [9], [5,4], [4,3,2]. In total there are six parts, so T(9,1) = 6.
For k = 2 the partitions of 9 into consecutive parts that differ by 2 are [9], [5, 3, 1]. In total there are four parts, so T(9,2) = 4.
		

Crossrefs

Columns k: A000203 (k=0), A204217 (k=1), A066839 (k=2), A330889 (k=3), A334464 (k=4), A334732 (k=5), A334949 (k=6), A377300 (k=7), A377301 (k=8).
Triangles whose row sums give the column k: A127093 (k=0), A285914 (k=1), A330466 (k=2) (conjectured), A330888 (k=3), A334462 (k=4), A334540 (k=5), A339947 (k=6).
Sequences of number of partitions related to column k: A000005 (k=0), A001227 (k=1), A038548 (k=2), A117277 (k=3), A334461 (k=4), A334541 (k=5), A334948 (k=6).
Tables of partitions related to column k: A010766 (k=0), A286001 (k=1), A332266 (k=2), A334945 (k=3), A334618 (k=4).
Polygonal numbers related to column k: A001477 (k=0), A000217 (k=1), A000290 (k=2), A000326 (k=3), A000384 (k=4), A000566 (k=5), A000567 (k=6).

Programs

  • Mathematica
    nmax = 14;
    col[k_] := col[k] = CoefficientList[Sum[n x^(n(k n - k + 2)/2)/(1 - x^n), {n, 1, nmax}] + O[x]^(nmax+1), x];
    T[n_, k_] := col[k][[n+1]];
    Table[T[n-k, k], {n, 1, nmax}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Nov 30 2020 *)

Formula

The g.f. for column k is Sum_{n>=1} n*x^(n*(k*n-k+2)/2)/(1-x^n). (For proof, see A330889. - N. J. A. Sloane, Nov 21 2020)
Previous Showing 11-20 of 53 results. Next