A294629 Partial sums of A294628.
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
Keywords
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.
Links
- Iain Fox, Table of n, a(n) for n = 1..10000
Crossrefs
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
Comments