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.

A049766 a(n) = Sum_{k=1..n} T(n,k), array T as in A049765.

Original entry on oeis.org

0, 1, 4, 7, 14, 18, 29, 36, 48, 58, 77, 83, 106, 122, 141, 156, 187, 200, 235, 251, 280, 308, 351, 361, 403, 437, 476, 502, 557, 573, 632, 663, 712, 758, 813, 828, 899, 951, 1010, 1038, 1117, 1145, 1228, 1274, 1329, 1393, 1484
Offset: 1

Views

Author

Keywords

Crossrefs

Row sums of A049765.

Programs

  • GAP
    List([1..50], n-> Sum([1..n], k-> (k mod n) + (n mod k)) ); # G. C. Greubel, Dec 13 2019
  • Magma
    [&+[ (k mod n) + (n mod k): k in [1..n]]: n in [1..50]]; // G. C. Greubel, Dec 13 2019
    
  • Maple
    seq( add( `mod`(k, n) + `mod`(n, k), k = 1..n), n = 1..50); # G. C. Greubel, Dec 13 2019
  • Mathematica
    T[n_, k_] := Mod[n, k] + Mod[k, n]; Map[Total[T[#, Range[#]]] &, Range[80]] (* Carl Najafi, Aug 24 2011 *)
  • PARI
    a(n) = sum(k=1, n, k%n + n%k); \\ Michel Marcus, Aug 22 2015
    
  • Sage
    [sum((k%n) + (n%k) for k in (1..n)) for n in (1..50)] # G. C. Greubel, Dec 13 2019