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.

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).