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.

A332569 a(n) = Sum_{k=1..n} floor(n/k) * ceiling(n/k).

This page as a plain text file.
%I A332569 #19 Oct 24 2023 00:51:53
%S A332569 1,5,12,23,36,54,74,97,125,156,186,226,268,306,354,409,458,515,574,
%T A332569 636,710,778,838,922,1013,1086,1168,1264,1350,1452,1556,1651,1762,
%U A332569 1864,1966,2105,2234,2332,2448,2594,2726,2864,3004,3132,3294,3444,3564,3736,3917,4067
%N A332569 a(n) = Sum_{k=1..n} floor(n/k) * ceiling(n/k).
%F A332569 G.f.: ((1 + x) / (1 - x)) * Sum_{k>=1} x^k / (1 - x^k)^2.
%F A332569 a(n) = 1 + Sum_{k=1..n-1} (sigma(k) + sigma(k+1)) for n > 0.
%F A332569 a(n) ~ (Pi*n)^2/6. - _Vaclav Kotesovec_, Jun 24 2021
%t A332569 Table[Sum[Ceiling[n/k] Floor[n/k], {k, 1, n}], {n, 1, 50}]
%t A332569 Table[1 + Sum[DivisorSigma[1, k] + DivisorSigma[1, k + 1], {k, 1, n - 1}], {n, 1, 50}]
%t A332569 nmax = 50; CoefficientList[Series[((1 + x)/(1 - x)) Sum[x^k/(1 - x^k)^2, {k, 1, nmax}], {x, 0, nmax}], x] // Rest
%o A332569 (Magma) [&+[Floor(n/k)*Ceiling(n/k):k in [1..n]]:n in [1..50]]; // _Marius A. Burtea_, Feb 16 2020
%o A332569 (PARI) a(n) = sum(k=1, n, my(q=n/k); floor(q) * ceil(q)); \\ _Michel Marcus_, Feb 17 2020
%o A332569 (Python)
%o A332569 from math import isqrt
%o A332569 from sympy import divisor_sigma
%o A332569 def A332569(n): return -(s:=isqrt(n))**2*(s+1)+sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))-divisor_sigma(n) # _Chai Wah Wu_, Oct 23 2023
%Y A332569 Row sums of A085383.
%Y A332569 Cf. A000203, A006218, A006590, A024916, A049697, A222548, A332490.
%K A332569 nonn
%O A332569 1,2
%A A332569 _Ilya Gutkovskiy_, Feb 16 2020