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.

A068312 Arithmetic derivative of triangular numbers.

Original entry on oeis.org

0, 0, 1, 5, 7, 8, 10, 32, 60, 39, 16, 61, 71, 20, 71, 244, 212, 111, 123, 143, 247, 131, 34, 380, 520, 155, 378, 621, 275, 247, 263, 1008, 1280, 271, 239, 951, 795, 56, 343, 1256, 1004, 431, 451, 581, 1443, 942, 70, 2092, 2492, 840
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 25 2002

Keywords

Examples

			a(7) = d(7*8/2) = d(28) = d(2*14) = d(2)*14 + 2*d(14) = 1*14 + 2*d(2*7) = 14 + 2*(2*d(7) + d(2)*7) = 14 + 2*(2*1 + 1*7) = 14 + 2*9 = 14 + 18 = 32, where d(n) = A003415(n) with d(1) = 0, d(prime) = 1 and d(m*n) = d(m)*n + m*d(n).
		

Crossrefs

Programs

  • Haskell
    a068312 = a003415 . a000217  -- Reinhard Zumkeller, May 26 2015
    
  • Mathematica
    a[0] = a[1] = 0; a[n_] := (n*(n+1)/2) * Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n*(n+1)/2]); Array[a, 100, 0] (* Amiram Eldar, May 14 2025 *)
  • Python
    from sympy import factorint
    def A068312(n): return 0 if n <= 1 else ((n+1)*sum((n*e//p for p,e in factorint(n).items()))+ sum(((n+1)*e//p for p,e in factorint(n+1).items()))*n - (n*(n+1)//2))//2 # Chai Wah Wu, Jun 24 2022

Formula

a(n) = A003415(A000217(n)).
For n > 1: a(n) = A258197(n,2) = A258197(n,n-2). - Reinhard Zumkeller, May 26 2015

Extensions

a(0)=0 prepended by Reinhard Zumkeller, May 26 2015