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-5 of 5 results.

A294016 a(n) = sum of all divisors of all positive integers <= n, minus the sum of remainders of n mod k, for k = 1, 2, 3, ..., n.

Original entry on oeis.org

1, 4, 7, 14, 17, 30, 33, 48, 57, 74, 77, 110, 113, 134, 153, 184, 187, 230, 233, 278, 301, 330, 333, 406, 419, 452, 479, 536, 539, 624, 627, 690, 721, 762, 789, 900, 903, 948, 983, 1084, 1087, 1196, 1199, 1280, 1347, 1400, 1403, 1556, 1573, 1660, 1703, 1796, 1799, 1932, 1967, 2096, 2143, 2208, 2211, 2428, 2431, 2500
Offset: 1

Views

Author

Omar E. Pol, Oct 22 2017

Keywords

Comments

a(n) is also the area (also the number of cells) of the n-th polygon formed by the Dyck path described in A237593 and its mirror, as shown below in the example.
a(n) is also the volume (and the number of cubes) in the n-th level (starting from the top) of the pyramid described in A294017.

Examples

			Illustration of initial terms:
.
.   _ 1
.  |_|_ _ 4
.    |   |
.    |_ _|_ _   7
.        |   |_
.        |_    |
.          |_ _|_ _ _  14
.              |     |_
.              |       |
.              |_      |
.                |_ _ _|_ _ _
.                      |     |  17
.                      |     |_ _
.                      |_ _      |
.                          |     |
.                          |_ _ _|_ _ _ _
.                                |       |_  30
.                                |         |_
.                                |           |
.                                |_          |
.                                  |_        |
.                                    |_ _ _ _|_ _ _ _
.                                            |       |
.                                            |       |_  33
.                                            |         |_ _
.                                            |_ _          |
.                                                |_        |
.                                                  |       |
.                                                  |_ _ _ _|
.
		

Crossrefs

Programs

  • Maple
    A294016 := proc(n)
        A024916(n)-A004125(n) ;
    end proc:
    seq(A294016(n),n=1..80) ; # R. J. Mathar, Nov 07 2017
  • Mathematica
    Accumulate[Table[2*(DivisorSigma[1, n] - n) + 1, {n, 1, 100}]] (* Amiram Eldar, Mar 30 2024 *)
  • Python
    from math import isqrt
    def A294016(n): return -(s:=isqrt(n))**2*(s+1)+sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))-n**2 # Chai Wah Wu, Oct 22 2023

Formula

a(n) = A024916(n) - A004125(n).
a(n) = A000290(n) - A067436(n).
From Omar E. Pol, Nov 05 2017: (Start)
a(n) = A000203(n) + A024816(n) + A153485(n) - A004125(n).
a(n) = A000217(n) + A153485(n) - A004125(n).
a(n) = A000203(n) + A153485(n) + A244048(n). (End)
a(n) = (Pi^2/6 - 1) * n^2 + O(n*log(n)). - Amiram Eldar, Mar 30 2024

A294017 Partial sums of A294016.

Original entry on oeis.org

1, 5, 12, 26, 43, 73, 106, 154, 211, 285, 362, 472, 585, 719, 872, 1056, 1243, 1473, 1706, 1984, 2285, 2615, 2948, 3354, 3773, 4225, 4704, 5240, 5779, 6403, 7030, 7720, 8441, 9203, 9992, 10892, 11795, 12743, 13726, 14810, 15897, 17093, 18292, 19572, 20919, 22319, 23722, 25278, 26851, 28511, 30214, 32010, 33809
Offset: 1

Views

Author

Omar E. Pol, Oct 22 2017

Keywords

Comments

a(n) is also the volume of another version of the pyramid with n levels (starting from the top) described in A245092. Both pyramids have the same top view and the same front view, but in this pyramid the volume in the n-th level is equal to A294016(n) instead of A024916(n).

Crossrefs

Programs

  • Python
    from math import isqrt
    def A294017(n): return (((s:=isqrt(n))**2*(s+1)*((s+1)*((s<<1)+1)-6*(n+1))>>1) + sum((q:=n//k)*(-k*(q+1)*(3*k+(q<<1)+1)+3*(n+1)*((k<<1)+q+1)) for k in range(1,s+1)))//3-n*(n+1)*((n<<1)+1)//6 # Chai Wah Wu, Oct 22 2023

Formula

a(n) = A175254(n) - A072481(n).

A294628 a(n) = 8*(sigma(n) - n + (1/2)).

Original entry on oeis.org

4, 12, 12, 28, 12, 52, 12, 60, 36, 68, 12, 132, 12, 84, 76, 124, 12, 172, 12, 180, 92, 116, 12, 292, 52, 132, 108, 228, 12, 340, 12, 252, 124, 164, 108, 444, 12, 180, 140, 404, 12, 436, 12, 324, 268, 212, 12, 612, 68, 348, 172, 372, 12, 532, 140, 516, 188, 260, 12, 868, 12, 276
Offset: 1

Views

Author

Omar E. Pol, Nov 05 2017

Keywords

Crossrefs

Programs

  • GAP
    List([1..10^5],n->8*(Sigma(n)-n+(1/2))); # Muniru A Asiru, Mar 04 2018
  • Maple
    with(numtheory): seq(sigma(8*n-1)/8, n=1..10^3); # Muniru A Asiru, Mar 04 2018
  • Mathematica
    a[n_] := 8 (DivisorSigma[1, n] - n) + 4; Array[a, 62] (* Robert G. Wilson v, Dec 12 2017 *)

Formula

a(n) = 4*A294015(n).
a(n) = 8*(A001065(n) + (1/2)).
a(n) = 8*(A000203(n) - n + (1/2)).
a(n) = A239050(n) - 4*A235796(n).
a(n) = A017113(n-1) - 8*A235796(n).

A294629 Partial sums of A294628.

Original entry on oeis.org

4, 16, 28, 56, 68, 120, 132, 192, 228, 296, 308, 440, 452, 536, 612, 736, 748, 920, 932, 1112, 1204, 1320, 1332, 1624, 1676, 1808, 1916, 2144, 2156, 2496, 2508, 2760, 2884, 3048, 3156, 3600, 3612, 3792, 3932, 4336, 4348, 4784, 4796, 5120, 5388, 5600, 5612, 6224, 6292, 6640, 6812, 7184, 7196, 7728, 7868, 8384
Offset: 1

Views

Author

Omar E. Pol, Nov 05 2017

Keywords

Comments

a(n) is also the volume (and the number of cubes) in the n-th level (starting from the top) of the stepped pyramid described in A294630.
Number of terms less than 10^k, k=1,2,3,...: 1, 5, 19, 61, 195, 623, 1967, 6225, ... - Muniru A Asiru, Mar 04 2018

Examples

			Illustration of initial terms (n = 1..6):
.                                                  _ _ _ _ _ _
.                                _ _ _ _         _|     |     |_
.                _ _ _ _       _|   |   |_      |       |       |
.      _ _      |   |   |     |    _|_    |     |      _|_      |
.     |_|_|     |_ _|_ _|     |_ _|   |_ _|     |_ _ _|   |_ _ _|
.     |_|_|     |   |   |     |   |_ _|   |     |     |_ _|     |
.               |_ _|_ _|     |_    |    _|     |       |       |
.       4                       |_ _|_ _|       |_      |      _|
.                  16                             |_ _ _|_ _ _|
.                                  28
.                                                      56
.
.                                        _ _ _ _ _ _ _ _
.             _ _ _ _ _ _              _|       |       |_
.            |     |     |           _|         |         |_
.         _ _|     |     |_ _       |           |           |
.        |      _ _|_ _      |      |          _|_          |
.        |     |       |     |      |        _|   |_        |
.        |_ _ _|       |_ _ _|      |_ _ _ _|       |_ _ _ _|
.        |     |       |     |      |       |_     _|       |
.        |     |_ _ _ _|     |      |         |_ _|         |
.        |_ _      |      _ _|      |           |           |
.            |     |     |          |_          |          _|
.            |_ _ _|_ _ _|            |_        |        _|
.                                       |_ _ _ _|_ _ _ _|
.                 68
.                                              120
.
Note that for n >= 2 the structure has a hole (or hollow) in the center.
a(n) is the number of ON cells in the n-th diagram.
		

Crossrefs

For other related diagrams see A294630 (partial sums), A294016 and A237593.

Programs

  • GAP
    List([1..1000],n->Sum([1..n],k->8*(Sigma(k)-k+(1/2)))); # Muniru A Asiru, Mar 04 2018
    
  • Maple
    with(numtheory): seq(sum(8*(sigma(k)-k+(1/2)),k=1..n),n=1..1000); # Muniru A Asiru, Mar 04 2018
  • Mathematica
    f[n_] := 8 (DivisorSigma[1, n] - n) + 4; Accumulate@Array[f, 56] (* Robert G. Wilson v, Dec 12 2017 *)
  • PARI
    a(n) = 4*(sum(k=1, n, n\k*k) - sum(k=2, n, n%k)) \\ Iain Fox, Dec 10 2017
    
  • PARI
    first(n) = my(res = vector(n)); res[1] = 4; for(x=2, n, res[x] = res[x-1] + 8*(sigma(x) - x + (1/2))); res; \\ Iain Fox, Dec 10 2017
    
  • Python
    from math import isqrt
    def A294629(n): return -(s:=isqrt(n))**2*(s+1)+sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))-n**2<<2 # Chai Wah Wu, Oct 22 2023

Formula

a(n) = 4*A294016(n).
a(n) = A016742(n) - 8*A004125(n).
a(n) = A016742(n) - 4*A067436(n).
a(n) = A243980(n) - 4*A004125(n).
a(n) = A243980(n) - 2*A067436(n).

A294630 Partial sums of A294629.

Original entry on oeis.org

4, 20, 48, 104, 172, 292, 424, 616, 844, 1140, 1448, 1888, 2340, 2876, 3488, 4224, 4972, 5892, 6824, 7936, 9140, 10460, 11792, 13416, 15092, 16900, 18816, 20960, 23116, 25612, 28120, 30880, 33764, 36812, 39968, 43568, 47180, 50972, 54904, 59240, 63588, 68372, 73168, 78288, 83676, 89276, 94888, 101112
Offset: 1

Views

Author

Omar E. Pol, Nov 05 2017

Keywords

Comments

a(n) is also the volume of a stepped pyramid with n levels which is another version of the stepped pyramid described in A244050. Both pyramids have the same top view and the same front view, that is to say externally both pyramids are equal, but this pyramid with n levels contains a central chamber whose volume is 4*A072481(n). For more information about the central chamber see the diagrams in A294629.
a(n) is the number of unit cubes of the pyramid with n levels.

Examples

			Illustration of the top view of the pyramid with 16 levels and 4224 unit cubes:
.                 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.                |  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |
.                | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
.             _ _| |  _ _ _ _ _ _ _ _ _ _ _ _ _ _  | |_ _
.           _|  _ _| |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |_ _  |_
.         _|  _|  _| |  _ _ _ _ _ _ _ _ _ _ _ _  | |_  |_  |_
.        |  _|   |_ _| |_ _ _ _ _ _ _ _ _ _ _ _| |_ _|   |_  |
.   _ _ _| |  _ _|     |  _ _ _ _ _ _ _ _ _ _  |     |_ _  | |_ _ _
.  |  _ _ _|_| |      _| |_ _ _ _ _ _ _ _ _ _| |_      | |_|_ _ _  |
.  | | |  _ _ _|    _|_ _|  _ _ _ _ _ _ _ _  |_ _|_    |_ _ _  | | |
.  | | | | |  _ _ _| |  _| |_ _ _ _ _ _ _ _| |_  | |_ _ _  | | | | |
.  | | | | | | |  _ _|_|  _|  _ _ _ _ _ _  |_  |_|_ _  | | | | | | |
.  | | | | | | | | |  _ _|   |_ _ _ _ _ _|   |_ _  | | | | | | | | |
.  | | | | | | | | | | |  _ _|  _ _ _ _  |_ _  | | | | | | | | | | |
.  | | | | | | | | | | | | |  _|_ _ _ _|_  | | | | | | | | | | | | |
.  | | | | | | | | | | | | | | |  _ _  | | | | | | | | | | | | | | |
.  | | | | | | | | | | | | | | | |   | | | | | | | | | | | | | | | |
.  | | | | | | | | | | | | | | | |_ _| | | | | | | | | | | | | | | |
.  | | | | | | | | | | | | | |_|_ _ _ _|_| | | | | | | | | | | | | |
.  | | | | | | | | | | | |_|_  |_ _ _ _|  _|_| | | | | | | | | | | |
.  | | | | | | | | | |_|_    |_ _ _ _ _ _|    _|_| | | | | | | | | |
.  | | | | | | | |_|_ _  |_  |_ _ _ _ _ _|  _|  _ _|_| | | | | | | |
.  | | | | | |_|_ _  | |_  |_ _ _ _ _ _ _ _|  _| |  _ _|_| | | | | |
.  | | | |_|_ _    |_|_ _| |_ _ _ _ _ _ _ _| |_ _|_|    _ _|_| | | |
.  | |_|_ _ _  |     |_  |_ _ _ _ _ _ _ _ _ _|  _|     |  _ _ _|_| |
.  |_ _ _  | |_|_      | |_ _ _ _ _ _ _ _ _ _| |      _|_| |  _ _ _|
.        | |_    |_ _  |_ _ _ _ _ _ _ _ _ _ _ _|  _ _|    _| |
.        |_  |_  |_  | |_ _ _ _ _ _ _ _ _ _ _ _| |  _|  _|  _|
.          |_  |_ _| |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |_ _|  _|
.            |_ _  | |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |  _ _|
.                | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
.                | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
.                |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
.
Note that the above diagram contains a hidden pattern, simpler, which emerges from the front view of every corner of the stepped pyramid. For more information about the hidden pattern see A237593 and A245092.
		

Crossrefs

Programs

  • GAP
    List([1..50],n->Sum([1..n],m->Sum([1..m],k->8*(Sigma(k)-k+(1/2))))); # Muniru A Asiru, Mar 04 2018
    
  • Maple
    with(numtheory): seq(sum(sum(8*(sigma(j)-j+(1/2)),j=1..k),k=1..n),n=1..50); # Muniru A Asiru, Mar 04 2018
  • Mathematica
    f[n_] := 8 (DivisorSigma[1, n] - n) + 4; Accumulate@ Accumulate@ Array[f, 48] (* Robert G. Wilson v, Dec 12 2017 *)
  • Python
    from math import isqrt
    def A294630(n): return ((((s:=isqrt(n))**2*(s+1)*((s+1)*((s<<1)+1)-6*(n+1))>>1) + sum((q:=n//k)*(-k*(q+1)*(3*k+(q<<1)+1)+3*(n+1)*((k<<1)+q+1)) for k in range(1, s+1))<<2)-(n*(n+1)*((n<<1)+1)<<1))//3 # Chai Wah Wu, Nov 01 2023

Formula

a(n) = 4*A294017(n).
a(n) = A002492(n) - 8*A072481(n).
a(n) = A244050(n) - 4*A072481(n).
Showing 1-5 of 5 results.