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.

A053807 a(n) = Sum_{k=1..n, n mod k = 1} k^2.

Original entry on oeis.org

0, 0, 4, 9, 20, 25, 49, 49, 84, 90, 129, 121, 209, 169, 249, 259, 340, 289, 454, 361, 545, 499, 609, 529, 849, 650, 849, 819, 1049, 841, 1299, 961, 1364, 1219, 1449, 1299, 1910, 1369, 1809, 1699, 2209, 1681, 2499, 1849, 2561, 2365, 2649
Offset: 1

Views

Author

N. J. A. Sloane, Apr 07 2000

Keywords

Crossrefs

Cf. A001157.

Programs

  • Magma
    [0] cat [DivisorSigma(2, n-1) -1: n in [2..50]]; // G. C. Greubel, Feb 28 2019
    
  • Maple
    f:= n -> numtheory:-sigma[2](n-1) - 1: f(1):= 0:
    map(f, [$1..100]); # Robert Israel, Jan 29 2018
  • Mathematica
    a[1] = 0; a[n_] := DivisorSigma[2, n - 1] - 1;
    Array[a, 50] (* Jean-François Alcover, Feb 28 2019 *)
  • PARI
    concat([0], vector(50, n, n++; sigma(n-1, 2) -1)) \\ G. C. Greubel, Feb 28 2019
    
  • Sage
    [0] + [sigma(n-1, 2) - 1 for n in (2..50)] # G. C. Greubel, Feb 28 2019

Formula

a(n) = sigma_2(n-1) - 1 for n >= 2.
G.f.: -x^2/(1 - x) + Sum_{k>=1} k^2*x^(k+1)/(1 - x^k). - Ilya Gutkovskiy, Mar 17 2017