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

A262626 Visible parts of the perspective view of the stepped pyramid whose structure essentially arises after the 90-degree-zig-zag folding of the isosceles triangle A237593.

Original entry on oeis.org

1, 1, 1, 3, 2, 2, 2, 2, 2, 1, 1, 2, 7, 3, 1, 1, 3, 3, 3, 3, 2, 2, 3, 12, 4, 1, 1, 1, 1, 4, 4, 4, 4, 2, 1, 1, 2, 4, 15, 5, 2, 1, 1, 2, 5, 5, 3, 5, 5, 2, 2, 2, 2, 5, 9, 9, 6, 2, 1, 1, 1, 1, 2, 6, 6, 6, 6, 3, 1, 1, 1, 1, 3, 6, 28, 7, 2, 2, 1, 1, 2, 2, 7, 7, 7, 7, 3, 2, 1, 1, 2, 3, 7, 12, 12, 8, 3, 1, 2, 2, 1, 3, 8, 8, 8, 8, 8, 3, 2, 1, 1
Offset: 1

Views

Author

Omar E. Pol, Sep 26 2015

Keywords

Comments

Also the rows of both triangles A237270 and A237593 interleaved.
Also, irregular triangle read by rows in which T(n,k) is the area of the k-th region (from left to right in ascending diagonal) of the n-th symmetric set of regions (from the top to the bottom in descending diagonal) in the two-dimensional diagram of the perspective view of the infinite stepped pyramid described in A245092 (see the diagram in the Links section).
The diagram of the symmetric representation of sigma is also the top view of the pyramid, see Links section. For more information about the diagram see also A237593 and A237270.
The number of cubes at the n-th level is also A024916(n), the sum of all divisors of all positive integers <= n.
Note that this pyramid is also a quarter of the pyramid described in A244050. Both pyramids have infinitely many levels.
Odd-indexed rows are also the rows of the irregular triangle A237270.
Even-indexed rows are also the rows of the triangle A237593.
Lengths of the odd-indexed rows are in A237271.
Lengths of the even-indexed rows give 2*A003056.
Row sums of the odd-indexed rows gives A000203, the sum of divisors function.
Row sums of the even-indexed rows give the positive even numbers (see A005843).
Row sums give A245092.
From the front view of the stepped pyramid emerges a geometric pattern which is related to A001227, the number of odd divisors of the positive integers.
The connection with the odd divisors of the positive integers is as follows: A261697 --> A261699 --> A237048 --> A235791 --> A237591 --> A237593 --> A237270 --> this sequence.

Examples

			Irregular triangle begins:
  1;
  1, 1;
  3;
  2, 2;
  2, 2;
  2, 1, 1, 2;
  7;
  3, 1, 1, 3;
  3, 3;
  3, 2, 2, 3;
  12;
  4, 1, 1, 1, 1, 4;
  4, 4;
  4, 2, 1, 1, 2, 4;
  15;
  5, 2, 1, 1, 2, 5;
  5, 3, 5;
  5, 2, 2, 2, 2, 5;
  9, 9;
  6, 2, 1, 1, 1, 1, 2, 6;
  6, 6;
  6, 3, 1, 1, 1, 1, 3, 6;
  28;
  7, 2, 2, 1, 1, 2, 2, 7;
  7, 7;
  7, 3, 2, 1, 1, 2, 3, 7;
  12, 12;
  8, 3, 1, 2, 2, 1, 3, 8;
  8, 8, 8;
  8, 3, 2, 1, 1, 1, 1, 2, 3, 8;
  31;
  9, 3, 2, 1, 1, 1, 1, 2, 3, 9;
  ...
Illustration of the odd-indexed rows of triangle as the diagram of the symmetric representation of sigma which is also the top view of the stepped pyramid:
.
   n  A000203    A237270    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   1     1   =      1      |_| | | | | | | | | | | | | | | |
   2     3   =      3      |_ _|_| | | | | | | | | | | | | |
   3     4   =    2 + 2    |_ _|  _|_| | | | | | | | | | | |
   4     7   =      7      |_ _ _|    _|_| | | | | | | | | |
   5     6   =    3 + 3    |_ _ _|  _|  _ _|_| | | | | | | |
   6    12   =     12      |_ _ _ _|  _| |  _ _|_| | | | | |
   7     8   =    4 + 4    |_ _ _ _| |_ _|_|    _ _|_| | | |
   8    15   =     15      |_ _ _ _ _|  _|     |  _ _ _|_| |
   9    13   =  5 + 3 + 5  |_ _ _ _ _| |      _|_| |  _ _ _|
  10    18   =    9 + 9    |_ _ _ _ _ _|  _ _|    _| |
  11    12   =    6 + 6    |_ _ _ _ _ _| |  _|  _|  _|
  12    28   =     28      |_ _ _ _ _ _ _| |_ _|  _|
  13    14   =    7 + 7    |_ _ _ _ _ _ _| |  _ _|
  14    24   =   12 + 12   |_ _ _ _ _ _ _ _| |
  15    24   =  8 + 8 + 8  |_ _ _ _ _ _ _ _| |
  16    31   =     31      |_ _ _ _ _ _ _ _ _|
  ...
The above diagram arises from a simpler diagram as shown below.
Illustration of the even-indexed rows of triangle as the diagram of the deployed front view of the corner of the stepped pyramid:
.
.                                 A237593
Level                               _ _
1                                 _|1|1|_
2                               _|2 _|_ 2|_
3                             _|2  |1|1|  2|_
4                           _|3   _|1|1|_   3|_
5                         _|3    |2 _|_ 2|    3|_
6                       _|4     _|1|1|1|1|_     4|_
7                     _|4      |2  |1|1|  2|      4|_
8                   _|5       _|2 _|1|1|_ 2|_       5|_
9                 _|5        |2  |2 _|_ 2|  2|        5|_
10              _|6         _|2  |1|1|1|1|  2|_         6|_
11            _|6          |3   _|1|1|1|1|_   3|          6|_
12          _|7           _|2  |2  |1|1|  2|  2|_           7|_
13        _|7            |3    |2 _|1|1|_ 2|    3|            7|_
14      _|8             _|3   _|1|2 _|_ 2|1|_   3|_             8|_
15    _|8              |3    |2  |1|1|1|1|  2|    3|              8|_
16   |9                |3    |2  |1|1|1|1|  2|    3|                9|
...
The number of horizontal line segments in the n-th level in each side of the diagram equals A001227(n), the number of odd divisors of n.
The number of horizontal line segments in the left side of the diagram plus the number of the horizontal line segment in the right side equals A054844(n).
The total number of vertical line segments in the n-th level of the diagram equals A131507(n).
The diagram represents the first 16 levels of the pyramid.
The diagram of the isosceles triangle and the diagram of the top view of the pyramid shows the connection between the partitions into consecutive parts and the sum of divisors function (see also A286000 and A286001). - _Omar E. Pol_, Aug 28 2018
The connection between the isosceles triangle and the stepped pyramid is due to the fact that this object can also be interpreted as a pop-up card. - _Omar E. Pol_, Nov 09 2022
		

Crossrefs

Famous sequences that are visible in the stepped pyramid:
Cf. A000040 (prime numbers)......., for the characteristic shape see A346871.
Cf. A000079 (powers of 2)........., for the characteristic shape see A346872.
Cf. A000203 (sum of divisors)....., total area of the terraces in the n-th level.
Cf. A000217 (triangular numbers).., for the characteristic shape see A346873.
Cf. A000225 (Mersenne numbers)...., for a visualization see A346874.
Cf. A000384 (hexagonal numbers)..., for the characteristic shape see A346875.
Cf. A000396 (perfect numbers)....., for the characteristic shape see A346876.
Cf. A000668 (Mersenne primes)....., for a visualization see A346876.
Cf. A001097 (twin primes)........., for a visualization see A346871.
Cf. A001227 (# of odd divisors)..., number of subparts in the n-th level.
Cf. A002378 (oblong numbers)......, for a visualization see A346873.
Cf. A008586 (multiples of 4)......, perimeters of the successive levels.
Cf. A008588 (multiples of 6)......, for the characteristic shape see A224613.
Cf. A013661 (zeta(2))............., (area of the horizontal faces)/(n^2), n -> oo.
Cf. A014105 (second hexagonals)..., for the characteristic shape see A346864.
Cf. A067742 (# of middle divisors), # cells in the main diagonal in n-th level.
Apart from zeta(2) other constants that are related to the stepped pyramid are A072691, A353908, A354238.

A034856 a(n) = binomial(n+1, 2) + n - 1 = n*(n+3)/2 - 1.

Original entry on oeis.org

1, 4, 8, 13, 19, 26, 34, 43, 53, 64, 76, 89, 103, 118, 134, 151, 169, 188, 208, 229, 251, 274, 298, 323, 349, 376, 404, 433, 463, 494, 526, 559, 593, 628, 664, 701, 739, 778, 818, 859, 901, 944, 988, 1033, 1079, 1126, 1174, 1223, 1273, 1324, 1376, 1429, 1483
Offset: 1

Views

Author

Keywords

Comments

Number of 1's in the n X n lower Hessenberg (0,1)-matrix (i.e., the matrix having 1's on or below the superdiagonal and 0's above the superdiagonal).
If a 2-set Y and 2-set Z, having one element in common, are subsets of an n-set X then a(n-2) is the number of 3-subsets of X intersecting both Y and Z. - Milan Janjic, Oct 03 2007
Number of binary operations which have to be added to Moisil's algebras to obtain algebraic counterparts of n-valued Łukasiewicz logics. See the Wójcicki and Malinowski book, page 31. - Artur Jasinski, Feb 25 2010
Also (n + 1)!(-1)^(n + 1) times the determinant of the n X n matrix given by m(i,j) = i/(i+1) if i=j and otherwise 1. For example, (5+1)! * ((-1)^(5+1)) * Det[{{1/2, 1, 1, 1, 1}, {1, 2/3, 1, 1, 1}, {1, 1, 3/4, 1, 1}, {1, 1, 1, 4/5, 1}, {1, 1, 1, 1, 5/6}}] = 19 = a(5), and (6+1)! * ((-1)^(6+1)) * Det[{{1/2, 1, 1, 1, 1, 1}, {1, 2/3, 1, 1, 1, 1}, {1, 1, 3/4, 1, 1, 1}, {1, 1, 1, 4/5, 1, 1}, {1, 1, 1, 1, 5/6, 1}, {1, 1, 1, 1, 1, 6/7}}] = 26 = a(6). - John M. Campbell, May 20 2011
2*a(n-1) = n*(n+1) - 4, n>=0, with a(-1) = -2 and a(0) = -1, gives the values for a*c of indefinite binary quadratic forms [a, b, c] of discriminant D = 17 for b = 2*n + 1. In general D = b^2 - 4*a*c > 0 and the form [a, b, c] is a*x^2 + b*x*y + c*y^2. - Wolfdieter Lang, Aug 15 2013
a(n) is not divisible by 3, 5, 7, or 11. - Vladimir Shevelev, Feb 03 2014
With a(0) = 1 and a(1) = 2, a(n-1) is the number of distinct values of 1 +- 2 +- 3 +- ... +- n, for n > 0. - Derek Orr, Mar 11 2015
Also, numbers m such that 8*m+17 is a square. - Bruno Berselli, Sep 16 2015
Omar E. Pol's formula from Apr 23 2008 can be interpreted as the position of an element located on the third diagonal of an triangular array (read by rows) provided n > 1. - Enrique Pérez Herrero, Aug 29 2016
a(n) is the sum of the numerator and denominator of the fraction that is the sum of 2/(n-1) + 2/n; all fractions are reduced and n > 2. - J. M. Bergot, Jun 14 2017
a(n) is also the number of maximal irredundant sets in the (n+2)-path complement graph for n > 1. - Eric W. Weisstein, Apr 12 2018
From Klaus Purath, Dec 07 2020: (Start)
a(n) is not divisible by primes listed in A038890. The prime factors are given in A038889 and the prime terms of the sequence are listed in A124199.
Each odd prime factor p divides exactly 2 out of any p consecutive terms with the exception of 17, which appears only once in such an interval of terms. If a(i) and a(k) form such a pair that are divisible by p, then i + k == -3 (mod p), see examples.
If A is a sequence satisfying the recurrence t(n) = 5*t(n-1) - 2*t(n-2) with the initial values either A(0) = 1, A(1) = n + 4 or A(0) = -1, A(1) = n-1, then a(n) = (A(i)^2 - A(i-1)*A(i+1))/2^i for i>0. (End)
Mark each point on a 4^n grid with the number of points that are visible from the point; for n > 1, a(n) is the number of distinct values in the grid. - Torlach Rush, Mar 23 2021
The sequence gives the number of "ON" cells in the cellular automaton on a quadrant of a square grid after the n-th stage, where the "ON" cells lie only on the external perimeter and the perimeter of inscribed squares having the cell (1,1) as a unique common vertex. See Spezia link. - Stefano Spezia, May 28 2025

Examples

			From _Bruno Berselli_, Mar 09 2015: (Start)
By the definition (first formula):
----------------------------------------------------------------------
  1       4         8           13            19              26
----------------------------------------------------------------------
                                                              X
                                              X              X X
                                X            X X            X X X
                    X          X X          X X X          X X X X
          X        X X        X X X        X X X X        X X X X X
  X      X X      X X X      X X X X      X X X X X      X X X X X X
          X        X X        X X X        X X X X        X X X X X
----------------------------------------------------------------------
(End)
From _Klaus Purath_, Dec 07 2020: (Start)
Assuming a(i) is divisible by p with 0 < i < p and a(k) is the next term divisible by p, then from i + k == -3 (mod p) follows that k = min(p*m - i - 3) != i for any integer m.
(1) 17|a(7) => k = min(17*m - 10) != 7 => m = 2, k = 24 == 7 (mod 17). Thus every a(17*m + 7) is divisible by 17.
(2) a(9) = 53 => k = min(53*m - 12) != 9 => m = 1, k = 41. Thus every a(53*m + 9) and a(53*m + 41) is divisible by 53.
(3) 101|a(273) => 229 == 71 (mod 101) => k = min(101*m - 74) != 71 => m = 1, k = 27. Thus every a(101*m + 27) and a(101*m + 71) is divisible by 101. (End)
From _Omar E. Pol_, Aug 08 2021: (Start)
Illustration of initial terms:                             _ _
.                                           _ _           |_|_|_
.                              _ _         |_|_|_         |_|_|_|_
.                   _ _       |_|_|_       |_|_|_|_       |_|_|_|_|_
.          _ _     |_|_|_     |_|_|_|_     |_|_|_|_|_     |_|_|_|_|_|_
.   _     |_|_|    |_|_|_|    |_|_|_|_|    |_|_|_|_|_|    |_|_|_|_|_|_|
.  |_|    |_|_|    |_|_|_|    |_|_|_|_|    |_|_|_|_|_|    |_|_|_|_|_|_|
.
.   1       4         8          13            19              26
------------------------------------------------------------------------ (End)
		

References

  • A. S. Karpenko, Łukasiewicz's Logics and Prime Numbers, 2006 (English translation).
  • G. C. Moisil, Essais sur les logiques non-chrysippiennes, Ed. Academiei, Bucharest, 1972.
  • Wójcicki and Malinowski, eds., Łukasiewicz Sentential Calculi, Wrocław: Ossolineum, 1977.

Crossrefs

Subsequence of A165157.
Triangular numbers (A000217) minus two.
Third diagonal of triangle in A059317.

Programs

  • Haskell
    a034856 = subtract 1 . a000096 -- Reinhard Zumkeller, Feb 20 2015
    
  • Magma
    [Binomial(n + 1, 2) + n - 1: n in [1..60]]; // Vincenzo Librandi, May 21 2011
    
  • Maple
    a := n -> hypergeom([-2, n-1], [1], -1);
    seq(simplify(a(n)), n=1..53); # Peter Luschny, Aug 02 2014
  • Mathematica
    f[n_] := n (n + 3)/2 - 1; Array[f, 55] (* or *) k = 2; NestList[(k++; # + k) &, 1, 55] (* Robert G. Wilson v, Jun 11 2010 *)
    Table[Binomial[n + 1, 2] + n - 1, {n, 53}] (* or *)
    Rest@ CoefficientList[Series[x (1 + x - x^2)/(1 - x)^3, {x, 0, 53}], x] (* Michael De Vlieger, Aug 29 2016 *)
  • Maxima
    A034856(n) := block(
            n-1+(n+1)*n/2
    )$ /* R. J. Mathar, Mar 19 2012 */
    
  • PARI
    A034856(n)=(n+3)*n\2-1 \\ M. F. Hasler, Jan 21 2015
    
  • Python
    def A034856(n): return n*(n+3)//2 -1 # G. C. Greubel, Jun 15 2025

Formula

G.f.: A(x) = x*(1 + x - x^2)/(1 - x)^3.
a(n) = A049600(3, n-2).
a(n) = binomial(n+2, 2) - 2. - Paul Barry, Feb 27 2003
With offset 5, this is binomial(n, 0) - 2*binomial(n, 1) + binomial(n, 2), the binomial transform of (1, -2, 1, 0, 0, 0, ...). - Paul Barry, Jul 01 2003
Row sums of triangle A131818. - Gary W. Adamson, Jul 27 2007
Binomial transform of (1, 3, 1, 0, 0, 0, ...). Also equals A130296 * [1,2,3,...]. - Gary W. Adamson, Jul 27 2007
Row sums of triangle A134225. - Gary W. Adamson, Oct 14 2007
a(n) = A000217(n+1) - 2. - Omar E. Pol, Apr 23 2008
From Jaroslav Krizek, Sep 05 2009: (Start)
a(n) = a(n-1) + n + 1 for n >= 1.
a(n) = n*(n-1)/2 + 2*n - 1.
a(n) = A000217(n-1) + A005408(n-1) = A005843(n-1) + A000124(n-1). (End)
a(n) = Hyper2F1([-2, n-1], [1], -1). - Peter Luschny, Aug 02 2014
a(n) = floor[1/(-1 + Sum_{m >= n+1} 1/S2(m,n+1))], where S2 is A008277. - Richard R. Forberg, Jan 17 2015
a(n) = A101881(2*(n-1)). - Reinhard Zumkeller, Feb 20 2015
a(n) = A253909(n+3) - A000217(n+3). - David Neil McGrath, May 23 2015
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>3. - David Neil McGrath, May 23 2015
For n > 1, a(n) = 4*binomial(n-1,1) + binomial(n-2,2), comprising the third column of A267633. - Tom Copeland, Jan 25 2016
From Klaus Purath, Dec 07 2020: (Start)
a(n) = A024206(n) + A024206(n+1).
a(2*n-1) = -A168244(n+1).
a(2*n) = A091823(n). (End)
Sum_{n>=1} 1/a(n) = 3/2 + 2*Pi*tan(sqrt(17)*Pi/2)/sqrt(17). - Amiram Eldar, Jan 06 2021
a(n) + a(n+1) = A028347(n+2). - R. J. Mathar, Mar 13 2021
a(n) = A000290(n) - A161680(n-1). - Omar E. Pol, Mar 26 2021
E.g.f.: 1 + exp(x)*(x^2 + 4*x - 2)/2. - Stefano Spezia, Jun 05 2021
a(n) = A024916(n) - A244049(n). - Omar E. Pol, Aug 01 2021
a(n) = A000290(n) - A000217(n-2). - Omar E. Pol, Aug 05 2021

Extensions

More terms from Zerinvary Lajos, May 12 2006

A048050 Chowla's function: sum of divisors of n except for 1 and n.

Original entry on oeis.org

0, 0, 0, 2, 0, 5, 0, 6, 3, 7, 0, 15, 0, 9, 8, 14, 0, 20, 0, 21, 10, 13, 0, 35, 5, 15, 12, 27, 0, 41, 0, 30, 14, 19, 12, 54, 0, 21, 16, 49, 0, 53, 0, 39, 32, 25, 0, 75, 7, 42, 20, 45, 0, 65, 16, 63, 22, 31, 0, 107, 0, 33, 40, 62, 18, 77, 0, 57, 26, 73, 0, 122, 0, 39, 48, 63, 18, 89
Offset: 1

Views

Author

Keywords

Comments

a(n) = 0 if and only if n is a noncomposite number (cf. A008578). - Omar E. Pol, Jul 31 2012
If n is semiprime, a(n) = A008472(n). - Wesley Ivan Hurt, Aug 22 2013
If n = p*q where p and q are distinct primes then a(n) = p+q.
If k,m > 1 are coprime, then a(k*m) = a(k)*a(m) + (m+1)*a(k) + (k+1)*a(m) + k + m. - Robert Israel, Apr 28 2015
a(n) is also the total number of parts in the partitions of n into equal parts that contain neither 1 nor n as a part (see example). More generally, a(n) is the total number of parts congruent to 0 mod k in the partitions of k*n into equal parts that contain neither k nor k*n as a part. - Omar E. Pol, Nov 24 2019
Named after the Indian-American mathematician Sarvadaman D. S. Chowla (1907-1995). - Amiram Eldar, Mar 09 2024

Examples

			For n = 20 the divisors of 20 are 1,2,4,5,10,20, so a(20) = 2+4+5+10 = 21.
On the other hand, the partitions of 20 into equal parts that contain neither 1 nor 20 as a part are [10,10], [5,5,5,5], [4,4,4,4,4], [2,2,2,2,2,2,2,2,2,2]. There are 21 parts, so a(20) = 21. - _Omar E. Pol_, Nov 24 2019
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 92.

Crossrefs

Programs

  • Haskell
    a048050 1 = 0
    a048050 n = (subtract 1) $ sum $ a027751_row n
    -- Reinhard Zumkeller, Feb 09 2013
    
  • Magma
    A048050:=func< n | n eq 1 or IsPrime(n) select 0 else &+[ a: a in Divisors(n) | a ne 1 and a ne n ] >; [ A048050(n): n in [1..100] ]; // Klaus Brockhaus, Mar 04 2011
    
  • Maple
    A048050 := proc(n) if n > 1 then numtheory[sigma](n)-1-n ; else 0; end if; end proc:
  • Mathematica
    f[n_]:=Plus@@Divisors[n]-n-1; Table[f[n],{n,100}] (*Vladimir Joseph Stephan Orlovsky, Sep 13 2009*)
    Join[{0},DivisorSigma[1,#]-#-1&/@Range[2,80]] (* Harvey P. Dale, Feb 25 2015 *)
  • PARI
    a(n)=if(n>1,sigma(n)-n-1,0) \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from sympy import divisors
    def a(n): return sum(divisors(n)[1:-1]) # Indranil Ghosh, Apr 26 2017
    
  • Python
    from sympy import divisor_sigma
    def A048050(n): return 0 if n == 1 else divisor_sigma(n)-n-1 # Chai Wah Wu, Apr 18 2021

Formula

a(n) = A000203(n) - A065475(n).
a(n) = A001065(n) - 1, n > 1.
For n > 1: a(n) = Sum_{k=2..A000005(n)-1} A027750(n,k). - Reinhard Zumkeller, Feb 09 2013
a(n) = A000203(n) - n - 1, n > 1. - Wesley Ivan Hurt, Aug 22 2013
G.f.: Sum_{k>=2} k*x^(2*k)/(1 - x^k). - Ilya Gutkovskiy, Jan 22 2017

A161680 a(n) = binomial(n,2): number of size-2 subsets of {0,1,...,n} that contain no consecutive integers.

Original entry on oeis.org

0, 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035, 1081, 1128, 1176, 1225, 1275, 1326, 1378
Offset: 0

Views

Author

Jaroslav Krizek, Jun 16 2009

Keywords

Comments

Essentially the same as A000217: zero followed by A000217. - Joerg Arndt, Jul 26 2015
Count of entries <= n in A003057.
a(n) is the number of size-2 subsets of [n+1] that contain no consecutive integers, a(n+1) is the n-th triangular number. - Dennis P. Walsh, Mar 30 2011
Construct the n-th row of Pascal's triangle (A007318) from the preceding row, starting with row 0 = 1. a(n) is the sequence consisting of the total number of additions required to compute the triangle in this way up to row n. Copying a term does not count as an addition. - Douglas Latimer, Mar 05 2012
a(n-1) is also the number of ordered partitions (compositions) of n >= 1 into exactly 3 parts. - Juergen Will, Jan 02 2016
a(n+2) is also the number of weak compositions (ordered weak partitions) of n into exactly 3 parts. - Juergen Will, Jan 19 2016
In other words, this is the number of relations between entities, for example between persons: Two persons (n = 2) will have one relation (a(n) = 1), whereas four persons will have six relations to each other, and 20 persons will have 190 relations between them. - Halfdan Skjerning, May 03 2017
This also describes the largest number of intersections between n lines of equal length sequentially connected at (n-1) joints. The joints themselves do not count as intersection points. - Joseph Rozhenko, Oct 05 2021
The lexicographically earliest infinite sequence of nonnegative integers with monotonically increasing differences (that are also nonnegative integers). - Joe B. Stephen, Jul 22 2023

Examples

			A003057 starts 2, 3, 3, 4, 4,..., so there are a(0)=0 numbers <= 0, a(1)=0 numbers <= 1, a(2)=1 number <= 2, a(3)=3 numbers <= 3 in A003057.
For n=4, a(4)=6 since there are exactly 6 size-2 subsets of {0,1,2,3,4} that contain no consecutive integers, namely, {0,2}, {0,3}, {0,4}, {1,3}, {1,4}, and {2,4}.
		

Crossrefs

Programs

  • Magma
    a003057:=func< n | Round(Sqrt(2*(n-1)))+1 >; S:=[]; m:=2; count:=0; for n in [2..2000] do if a003057(n) lt m then count+:=1; else Append(~S, count); m+:=1; end if; end for; S; // Klaus Brockhaus, Nov 30 2010
    
  • Maple
    seq(binomial(n,2),n=0..50);
  • Mathematica
    Join[{a = 0}, Table[a += n, {n, 0, 100}]] (* Vladimir Joseph Stephan Orlovsky, Jun 12 2011 *)
    f[n_] := n(n-1)/2; Array[f, 54, 0] (* Robert G. Wilson v, Jul 26 2015 *)
    Binomial[Range[0,60],2] (* or *) LinearRecurrence[{3,-3,1},{0,0,1},60] (* Harvey P. Dale, Apr 14 2017 *)
  • PARI
    a(n)=n*(n-1)/2 \\ Charles R Greathouse IV, Jun 17 2017

Formula

a(n) = (n^2 - n)/2 = n*(n - 1)/2.
a(n) = A000124(n-1)-1 = A000217(n-1).
a(n) = a(n-1)+n-1 (with a(0)=a(1)=0). - Vincenzo Librandi, Nov 30 2010
Compositions: C(n,3) = binomial(n-1,n-3) = binomial(n-1,2), n>0. - Juergen Will, Jan 02 2015
G.f.: x^2/(1-x)^3. - Dennis P. Walsh, Mar 30 2011
G.f. with offset 1: Compositions: (x+x^2+x^3+...)^3 = (x/(1-x))^3. - Juergen Will, Jan 02 2015
a(n-1) = 6*n*s(1,n), n >= 1, where s(h,k) are the Dedekind sums. For s(1,n) see A264388(n)/A264389(n), also for references. - Wolfdieter Lang, Jan 11 2016
a(n) = A244049(n+1) + A004125(n+1). - Omar E. Pol, Mar 25 2021
a(n) = A000290(n+1) - A034856(n+1). - Omar E. Pol, Mar 30 2021
E.g.f.: exp(x)*x^2/2. - Stefano Spezia, Dec 19 2021

Extensions

Definition rephrased, offset set to 0 by R. J. Mathar, Aug 03 2010

A153485 Sum of all aliquot divisors of all positive integers <= n.

Original entry on oeis.org

0, 1, 2, 5, 6, 12, 13, 20, 24, 32, 33, 49, 50, 60, 69, 84, 85, 106, 107, 129, 140, 154, 155, 191, 197, 213, 226, 254, 255, 297, 298, 329, 344, 364, 377, 432, 433, 455, 472, 522, 523, 577, 578, 618, 651, 677, 678, 754, 762, 805, 826
Offset: 1

Views

Author

Omar E. Pol, Dec 27 2008

Keywords

Comments

a(n) is also the sum of first n terms of A000203, minus n-th triangular number.
n is prime if and only if a(n) - a(n-1) = 1. - Omar E. Pol, Dec 31 2012
Also the alternating row sums of A236540. - Omar E. Pol, Jun 23 2014
Sum of the areas of all x X z rectangles with x and y integers, x + y = n, x <= y and z = floor(y/x). - Wesley Ivan Hurt, Dec 21 2020
Apart from the symmetric representation of a(n) given in the Example section we have that a(n) can be represented with an arrowhead-shaped polygon formed by two zig-zag paths and the Dyck path described in the n-th row of A237593 as shown in the Links section. - Omar E. Pol, Jun 13 2022

Examples

			Assuming that a(1) = 0, for n = 6 the aliquot divisors of the first six positive integers are [0], [1], [1], [1, 2], [1], [1, 2, 3], so a(6) = 0 + 1 + 1 + 1 + 2 + 1 + 1 + 2 + 3 = 12.
From _Omar E. Pol_, Mar 27 2021: (Start)
The following diagrams show a square dissection into regions that are the symmetric representation of A000203, A004125, A244048 and this sequence.
In order to construct every diagram we use the following rules:
At stage 1 in the first quadrant of the square grid we draw the symmetric representation of sigma(n) using the two Dyck paths described in the rows n and n-1 of A237593.
At stage 2 we draw a pair of orthogonal line segments (if it's necessary) such that in the drawing appears totally formed a square n X n. The area of the region that is above the symmetric representation of sigma(n) equals A004125(n).
At stage 3 we draw a zig-zag path with line segments of length 1 from (0,n-1) to (n-1,0) such that appears a staircase with n-1 steps. The area of the region (or regions) that is below the symmetric representation of sigma(n) and above the staircase equals A244048(n).
At stage 4 we draw a copy of the symmetric representation of A004125(n) rotated 180 degrees such that one of its vertices is the point (0,0). a(n) is the area of the region (or regions) that is above of this region and below the staircase.
Illustration for n = 1..6:
.                                                                    _ _ _ _ _ _
.                                                     _ _ _ _ _     |_ _ _  |_ R|
.                                        _ _ _ _ R   |_ _S_|  R|    | |_T | S |_|
.                             _ _ _ R   |_ _  |_|    | |_  |_ _|    |   |_|_ _  |
.                    _ _     |_S_|_|    | |_|_S |    |_U_|_T | |    |_  U |_T | |
.             _ S   |_ S|   U|_|_|S|    |_ U|_| |    |   | |_|S|    | |_    |_| |
.            |_|    |_|_|    |_|_|_|    |_|_ _|_|    |_V_|_U_|_|    |_V_|_ _ _|_|
.                  U        V   U       V
.
n:            1       2         3           4             5               6
R: A004125    0       0         1           1             4               3
S: A000203    1       3         4           7             6              12
T: A244048    0       0         1           2             5               6
U: a(n)       0       1         2           5             6              12
V: A004125    0       0         1           1             4               3
.
Illustration for n = 7..9:
.                                                      _ _ _ _ _ _ _ _ _
.                                _ _ _ _ _ _ _ _      |_ _ _S_ _|       |
.            _ _ _ _ _ _ _      |_ _ _ _  |     |     | |_      |_ _ R  |
.           |_ _S_ _|     |     | |_    | |_ R  |     |   |_    |_ S|   |
.           | |_    |_ R  |     |   |_  |_S |_ _|     |     |_  T |_|_ _|
.           |   |_  T |_ _|     |     |_T |_ _  |     |_ _    |_      | |
.           |_ _  |_    | |     |_ _  U |_    | |     |   |  U  |_    | |
.           |   |_U |_  |S|     |   |_    |_  | |     |   |_ _    |_  |S|
.           |  V  |   |_| |     |  V  |     |_| |     |  V    |     |_| |
.           |_ _ _|_ _ _|_|     |_ _ _|_ _ _ _|_|     |_ _ _ _|_ _ _ _|_|
.
n:                 7                    8                      9
R: A004125         8                    8                     12
S: A000203         8                   15                     12
T: A244048        12                   13                     20
U: a(n)           13                   20                     24
V: A004125         8                    8                     12
.
Illustration for n = 10..12:
.                                                         _ _ _ _ _ _ _ _ _ _ _ _
.                              _ _ _ _ _ _ _ _ _ _ _     |_ _ _ _ _ _  |         |
.     _ _ _ _ _ _ _ _ _ _     |_ _ _S_ _ _|         |    | |_        | |_ _   R  |
.    |_ _ _S_ _  |       |    | |_        |      R  |    |   |_      |     |_    |
.    | |_      | |_  R   |    |   |_      |_        |    |     |_    |_  S   |   |
.    |   |_    |_ _|_    |    |     |_      |_      |    |       |_    |_    |_ _|
.    |     |_      | |_ _|    |       |_   T  |_ _ _|    |         |_ T  |_ _ _  |
.    |       |_ T  |_ _  |    |_ _ _    |_        | |    |_ _        |_        | |
.    |_ _      |_      | |    |     |_ U  |_      | |    |   |    U    |_      | |
.    |   |_ U    |_    |S|    |       |_    |_    |S|    |   |_          |_    | |
.    |     |_      |_  | |    |         |     |_  | |    |     |_ _        |_  | |
.    |  V    |       |_| |    |  V      |       |_| |    |  V      |         |_| |
.    |_ _ _ _|_ _ _ _ _|_|    |_ _ _ _ _|_ _ _ _ _|_|    |_ _ _ _ _|_ _ _ _ _ _|_|
.
n:            10                         11                          12
R: A004125    13                         22                          17
S: A000203    18                         12                          28
T: A244048    24                         32                          33
U: a(n)       32                         33                          49
V: A004125    13                         22                          17
.
Note that in the diagrams the symmetric representation of A244048(n+1) is the same as the symmetric representation of a(n) rotated 180 degrees.
The diagrams for n = 11 and n = 12 both are copies from the diagrams that are in A244048 dated Jun 24 2014.
[Another way for the illustration of this sequence which is visible in the pyramid described in A245092 will be added soon.]
(End)
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Sum[ DivisorSigma[1, m] - m, {m, n}]; Array[f, 60] (* Robert G. Wilson v, Jun 30 2014 *)
    Accumulate@ Table[DivisorSum[n, # &, # < n &], {n, 51}] (* or *)
    Table[Sum[k Floor[(n - k)/k], {k, n}], {n, 51}] (* Michael De Vlieger, Apr 02 2017 *)
  • PARI
    a(n) = sum(k=1, n, sigma(k)-k); \\ Michel Marcus, Jan 22 2017
    
  • Python
    from math import isqrt
    def A153485(n): return (-n*(n+1)-(s:=isqrt(n))**2*(s+1) + sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1)))>>1 # Chai Wah Wu, Oct 21 2023

Formula

a(n) = A024916(n) - A000217(n).
a(n) = A000217(n-1) - A004125(n). - Omar E. Pol, Jan 28 2014
a(n) = A000290(n) - A000203(n) - A024816(n) - A004125(n) = A024816(n+1) - A004125(n+1). - Omar E. Pol, Jun 23 2014
G.f.: (1/(1 - x))*Sum_{k>=1} k*x^(2*k)/(1 - x^k). - Ilya Gutkovskiy, Jan 22 2017
a(n) = Sum_{k=1..n} k * floor((n-k)/k). - Wesley Ivan Hurt, Apr 02 2017
a(n) ~ n^2 * (Pi^2/12 - 1/2). - Vaclav Kotesovec, Dec 21 2020
a(n) = A000290(n) - A000217(n) - A004125(n). - Omar E. Pol, Feb 26 2021
a(n) = A244048(n+1). - Omar E. Pol, Mar 28 2021

Extensions

Better name from Omar E. Pol, Jan 28 2014, Jun 23 2014

A346878 Sum of the divisors, except for the largest, of the n-th positive even number.

Original entry on oeis.org

1, 3, 6, 7, 8, 16, 10, 15, 21, 22, 14, 36, 16, 28, 42, 31, 20, 55, 22, 50, 54, 40, 26, 76, 43, 46, 66, 64, 32, 108, 34, 63, 78, 58, 74, 123, 40, 64, 90, 106, 44, 140, 46, 92, 144, 76, 50, 156, 73, 117, 114, 106, 56, 172, 106, 136, 126, 94, 62, 240, 64, 100, 186, 127
Offset: 1

Views

Author

Omar E. Pol, Aug 20 2021

Keywords

Comments

Sum of aliquot divisors (or aliquot parts) of the n-th positive even number.
a(n) has a symmetric representation.

Examples

			For n = 5 the 5th even number is 10 and the divisors of 10 are [1, 2, 5, 10] and the sum of the divisors of 10 except for the largest is 1 + 2 + 5 = 8, so a(5) = 8.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSigma[1, 2*n] - 2*n; Array[a, 100] (* Amiram Eldar, Aug 20 2021 *)
  • PARI
    a(n) = sigma(2*n) - 2*n; \\ Michel Marcus, Aug 20 2021
  • Python
    from sympy import divisors
    def a(n): return sum(divisors(2*n)[:-1])
    print([a(n) for n in range(1, 65)]) # Michael S. Branicky, Aug 20 2021
    

Formula

a(n) = A001065(2*n).
a(n) = 1 + A346880(n).
Sum_{k=1..n} a(k) = (5*Pi^2/24 - 1) * n^2 + O(n*log(n)). - Amiram Eldar, Mar 17 2024

A244048 Antisigma(n) minus the sum of remainders of n mod k, for k = 1,2,3,...,n.

Original entry on oeis.org

0, 0, 1, 2, 5, 6, 12, 13, 20, 24, 32, 33, 49, 50, 60, 69, 84, 85, 106, 107, 129, 140, 154, 155, 191, 197, 213, 226, 254, 255, 297, 298, 329, 344, 364, 377, 432, 433, 455, 472, 522, 523, 577, 578, 618, 651, 677, 678, 754, 762, 805, 826
Offset: 1

Views

Author

Omar E. Pol, Jun 23 2014

Keywords

Comments

For n > 1 a(n) is the sum of all aliquot parts of all positive integers < n. - Omar E. Pol, Mar 27 2021

Examples

			From _Omar E. Pol_, Mar 27 2021: (Start)
The following diagrams show a square dissection into regions that are the symmetric representation of A000203, A004125, A153485 and this sequence.
In order to construct every diagram we use the following rules:
At stage 1 in the first quadrant of the square grid we draw the symmetric representation of sigma(n) using the two Dyck paths described in the rows n and n-1 of A237593.
At stage 2 we draw a pair of orthogonal line segments (if it's necessary) such that in the drawing appears totally formed a square n X n. The area of the region that is above the symmetric representation of sigma(n) equals A004125(n).
At stage 3 we draw a zig-zag path with line segments of length 1 from (0,n-1) to (n-1,0) such that appears a staircase with n-1 steps. The area of the region (or regions) that is below the symmetric representation of sigma(n) and above the staircase equals a(n).
At stage 4 we draw a copy of the symmetric representation of A004125(n) rotated 180 degrees such that one of its vertices is the point (0,0). The area of the region (or regions) that is above of this region and below the staircase equals A153485(n).
Illustration for n = 1..6:
.                                                                    _ _ _ _ _ _
.                                                     _ _ _ _ _     |_ _ _  |_ R|
.                                        _ _ _ _ R   |_ _S_|  R|    | |_T | S |_|
.                             _ _ _ R   |_ _  |_|    | |_  |_ _|    |   |_|_ _  |
.                    _ _     |_S_|_|    | |_|_S |    |_U_|_T | |    |_  U |_T | |
.             _ S   |_ S|   U|_|_|S|    |_ U|_| |    |   | |_|S|    | |_    |_| |
.            |_|    |_|_|    |_|_|_|    |_|_ _|_|    |_V_|_U_|_|    |_V_|_ _ _|_|
.                  U        V   U       V
.
n:            1       2         3           4             5               6
R: A004125    0       0         1           1             4               3
S: A000203    1       3         4           7             6              12
T: a(n)       0       0         1           2             5               6
U: A153485    0       1         2           5             6              12
V: A004125    0       0         1           1             4               3
.
Illustration for n = 7..9:
.                                                      _ _ _ _ _ _ _ _ _
.                                _ _ _ _ _ _ _ _      |_ _ _S_ _|       |
.            _ _ _ _ _ _ _      |_ _ _ _  |     |     | |_      |_ _ R  |
.           |_ _S_ _|     |     | |_    | |_ R  |     |   |_    |_ S|   |
.           | |_    |_ R  |     |   |_  |_S |_ _|     |     |_  T |_|_ _|
.           |   |_  T |_ _|     |     |_T |_ _  |     |_ _    |_      | |
.           |_ _  |_    | |     |_ _  U |_    | |     |   |  U  |_    | |
.           |   |_U |_  |S|     |   |_    |_  | |     |   |_ _    |_  |S|
.           |  V  |   |_| |     |  V  |     |_| |     |  V    |     |_| |
.           |_ _ _|_ _ _|_|     |_ _ _|_ _ _ _|_|     |_ _ _ _|_ _ _ _|_|
.
n:                 7                    8                      9
R: A004125         8                    8                     12
S: A000203         8                   15                     12
T: a(n)           12                   13                     20
U: A153485        13                   20                     24
V: A004125         8                    8                     12
.
Illustration for n = 10..12:
.                                                         _ _ _ _ _ _ _ _ _ _ _ _
.                              _ _ _ _ _ _ _ _ _ _ _     |_ _ _ _ _ _  |         |
.     _ _ _ _ _ _ _ _ _ _     |_ _ _S_ _ _|         |    | |_        | |_ _   R  |
.    |_ _ _S_ _  |       |    | |_        |      R  |    |   |_      |     |_    |
.    | |_      | |_  R   |    |   |_      |_        |    |     |_    |_  S   |   |
.    |   |_    |_ _|_    |    |     |_      |_      |    |       |_    |_    |_ _|
.    |     |_      | |_ _|    |       |_   T  |_ _ _|    |         |_ T  |_ _ _  |
.    |       |_ T  |_ _  |    |_ _ _    |_        | |    |_ _        |_        | |
.    |_ _      |_      | |    |     |_ U  |_      | |    |   |    U    |_      | |
.    |   |_ U    |_    |S|    |       |_    |_    |S|    |   |_          |_    | |
.    |     |_      |_  | |    |         |     |_  | |    |     |_ _        |_  | |
.    |  V    |       |_| |    |  V      |       |_| |    |  V      |         |_| |
.    |_ _ _ _|_ _ _ _ _|_|    |_ _ _ _ _|_ _ _ _ _|_|    |_ _ _ _ _|_ _ _ _ _ _|_|
.
n:            10                         11                          12
R: A004125    13                         22                          17
S: A000203    18                         12                          28
T: a(n)       24                         32                          33
U: A153485    32                         33                          49
V: A004125    13                         22                          17
.
Note that in the diagrams the symmetric representation of a(n) is the same as the symmetric representation of A153485(n-1) rotated 180 degrees.
The original examples (dated Jun 24 2014) were only the diagrams for n = 11 and n = 12. (End)
		

Crossrefs

Programs

  • Mathematica
    With[{r=Range[100]},Join[{0},Accumulate[DivisorSigma[1,r]-r]]] (* Paolo Xausa, Oct 16 2023 *)
  • Python
    from math import isqrt
    def A244048(n): return (-n*(n-1)-(s:=isqrt(n-1))**2*(s+1) + sum((q:=(n-1)//k)*((k<<1)+q+1) for k in range(1,s+1)))>>1 # Chai Wah Wu, Oct 22 2023

Formula

a(n) = A024816(n) - A004125(n).
a(n) = A000217(n) - A000203(n) - A004125(n).
a(n) = A024916(n) - A000203(n) - A000217(n-1).
a(n) = A000217(n) - A123327(n).
a(n) = A153485(n-1), n >= 2.

A346870 Sum of all divisors, except the smallest and the largest of every number, of the first n positive even numbers.

Original entry on oeis.org

0, 2, 7, 13, 20, 35, 44, 58, 78, 99, 112, 147, 162, 189, 230, 260, 279, 333, 354, 403, 456, 495, 520, 595, 637, 682, 747, 810, 841, 948, 981, 1043, 1120, 1177, 1250, 1372, 1411, 1474, 1563, 1668, 1711, 1850, 1895, 1986, 2129, 2204, 2253, 2408, 2480, 2596, 2709, 2814
Offset: 1

Views

Author

Omar E. Pol, Aug 18 2021

Keywords

Comments

Partial sums of the even-indexed terms of Chowla's function A048050.
a(n) has a symmetric representation.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0,
          a(n-1)+numtheory[sigma](2*n)-1-2*n)
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Aug 19 2021
  • Mathematica
    s[n_] := DivisorSigma[1, 2*n] - 2*n - 1; Accumulate @ Array[s, 50] (* Amiram Eldar, Aug 19 2021 *)
  • Python
    from sympy import divisors
    from itertools import accumulate
    def A346880(n): return sum(divisors(2*n)[1:-1])
    def aupton(nn): return list(accumulate(A346880(n) for n in range(1, nn+1)))
    print(aupton(52)) # Michael S. Branicky, Aug 19 2021
    
  • Python
    from math import isqrt
    def A346870(n): return (t:=isqrt(m:=n>>1))**2*(t+1) - sum((q:=m//k)*((k<<1)+q+1) for k in range(1,t+1))-3*((s:=isqrt(n))**2*(s+1) - sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))>>1)-n*(n+2) # Chai Wah Wu, Nov 02 2023

Formula

a(n) = (5*Pi^2/24 - 1) * n^2 + O(n*log(n)). - Amiram Eldar, May 15 2023

A346880 Sum of the divisors, except the smallest and the largest, of the n-th positive even number.

Original entry on oeis.org

0, 2, 5, 6, 7, 15, 9, 14, 20, 21, 13, 35, 15, 27, 41, 30, 19, 54, 21, 49, 53, 39, 25, 75, 42, 45, 65, 63, 31, 107, 33, 62, 77, 57, 73, 122, 39, 63, 89, 105, 43, 139, 45, 91, 143, 75, 49, 155, 72, 116, 113, 105, 55, 171, 105, 135, 125, 93, 61, 239, 63, 99, 185, 126, 121
Offset: 1

Views

Author

Omar E. Pol, Aug 18 2021

Keywords

Comments

a(n) has a symmetric representation.

Examples

			For n = 5 the 5th even number is 10 and the divisors of 10 are [1, 2, 5, 10] and the sum of the divisors of 10 except the smaller and the largest is 2 + 5 = 7, so a(5) = 7.
		

Crossrefs

Bisection of A048050.
Partial sums give A346870.

Programs

  • Mathematica
    a[n_] := DivisorSigma[1, 2*n] - 2*n - 1; Array[a, 100] (* Amiram Eldar, Aug 19 2021 *)
  • Python
    from sympy import divisors
    def a(n): return sum(divisors(2*n)[1:-1])
    print([a(n) for n in range(1, 66)]) # Michael S. Branicky, Aug 19 2021

Formula

a(n) = A048050(2*n).
Sum_{k=1..n} a(k) = (5*Pi^2/24 - 1) * n^2 + O(n*log(n)). - Amiram Eldar, Mar 21 2024

A346869 Sum of all divisors, except the smallest and the largest of every number, of the first n odd numbers.

Original entry on oeis.org

0, 0, 0, 0, 3, 3, 3, 11, 11, 11, 21, 21, 26, 38, 38, 38, 52, 64, 64, 80, 80, 80, 112, 112, 119, 139, 139, 155, 177, 177, 177, 217, 235, 235, 261, 261, 261, 309, 327, 327, 366, 366, 388, 420, 420, 440, 474, 498, 498, 554, 554, 554, 640, 640, 640, 680, 680, 708, 772, 796
Offset: 1

Views

Author

Omar E. Pol, Aug 18 2021

Keywords

Comments

Partial sums of the odd-indexed terms of Chowla's function A048050.
a(n) has a symmetric representation.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=1, 0,
          a(n-1)+numtheory[sigma](2*n-1)-2*n)
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Aug 19 2021
  • Mathematica
    s[1] = 0; s[n_] := DivisorSigma[1, 2*n - 1] - 2*n; Accumulate @ Array[s, 50] (* Amiram Eldar, Aug 19 2021 *)
    Accumulate[Join[{0},Table[DivisorSigma[1,n]-n-1,{n,3,151,2}]]] (* Harvey P. Dale, Jul 29 2023 *)
  • Python
    from sympy import divisors
    from itertools import accumulate
    def A346879(n): return sum(divisors(2*n-1)[1:-1])
    def aupton(nn): return list(accumulate(A346879(n) for n in range(1, nn+1)))
    print(aupton(60)) # Michael S. Branicky, Aug 19 2021
Showing 1-10 of 15 results. Next