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.

A067436 a(n) = sum of all the remainders when n-th even number is divided by even numbers < 2n.

Original entry on oeis.org

0, 0, 2, 2, 8, 6, 16, 16, 24, 26, 44, 34, 56, 62, 72, 72, 102, 94, 128, 122, 140, 154, 196, 170, 206, 224, 250, 248, 302, 276, 334, 334, 368, 394, 436, 396, 466, 496, 538, 516, 594, 568, 650, 656, 678, 716, 806, 748, 828, 840, 898, 908, 1010, 984, 1058, 1040
Offset: 1

Views

Author

Amarnath Murthy, Jan 29 2002

Keywords

Examples

			a(5) = 8. The remainder when 10 is divided by 4,6,8, respectively is 2,4,2 and their sum = 8.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[4*n - 2*DivisorSigma[1, n] - 2, {n, 1, 100}]] (* Amiram Eldar, Mar 30 2024 *)
  • Python
    from math import isqrt
    def A067436(n): return (n**2<<1)+(s:=isqrt(n))**2*(s+1)-sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1)) # Chai Wah Wu, Oct 22 2023

Formula

a(n) = 2*A004125(n).
a(n) = (2 - Pi^2/6) * n^2 + O(n*log(n)). - Amiram Eldar, Mar 30 2024

Extensions

Corrected and extended by several contributors.