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.

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

Original entry on oeis.org

0, 0, 1, 1, 3, 1, 8, 10, 11, 12, 13, 13, 31, 37, 31, 41, 42, 47, 58, 60, 82, 86, 95, 76, 125, 123, 140, 103, 115, 134, 188, 229, 235, 213, 186, 239, 264, 283, 244, 243, 263, 342, 369, 430, 387, 407, 473, 413, 446, 489, 522, 492, 558, 570, 569, 547, 692
Offset: 1

Views

Author

Keywords

Crossrefs

Row sums of A049759.

Programs

  • GAP
    List([1..60], n-> Sum([1..n], k-> PowerMod(n,2,k)) ); # G. C. Greubel, Dec 14 2019
  • Magma
    [&+[n^2 mod i: i in [1..n]]: n in [1..60]]; // Vincenzo Librandi, Sep 18 2017
    
  • Maple
    seq( add( `mod`(n^2, k), k = 1..n), n = 1..60); # G. C. Greubel, Dec 14 2019
  • Mathematica
    Table[Sum[Mod[n^2, i], {i, n}], {n, 60}] (* Vincenzo Librandi, Sep 18 2017 *)
    Table[Sum[PowerMod[n,2,k],{k,n}],{n,60}] (* Harvey P. Dale, Mar 29 2018 *)
  • PARI
    a(n)=my(N=n^2);sum(k=2,n-1,N%k) \\ Charles R Greathouse IV, Mar 27 2014
    
  • Sage
    [sum(power_mod(n,2,k) for k in (1..n)) for n in (1..60)] # G. C. Greubel, Dec 14 2019
    

Formula

a(n) = Sum_{i=1..n} (n^2 mod i). - Wesley Ivan Hurt, Sep 15 2017