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.

A226355 Number of ordered pairs (i,j) with |i| * |j| <= n.

Original entry on oeis.org

1, 9, 21, 33, 49, 61, 81, 93, 113, 129, 149, 161, 189, 201, 221, 241, 265, 277, 305, 317, 345, 365, 385, 397, 433, 449, 469, 489, 517, 529, 565, 577, 605, 625, 645, 665, 705, 717, 737, 757, 793, 805, 841, 853, 881, 909, 929, 941, 985, 1001, 1029, 1049, 1077, 1089, 1125, 1145, 1181
Offset: 0

Views

Author

Robert Price, Jun 04 2013

Keywords

Programs

  • Maple
    with(numtheory): A226355:=n->1+4*n+4*add(tau(k), k=1..n): seq(A226355(n), n=0..100); # Wesley Ivan Hurt, Jan 10 2017
  • Mathematica
    f[n_] := Length[Complement[Union[Flatten[Table[If[Abs[i]*Abs[j] ≤ n, {i, j}], {i, -n, n}, {j, -n, n}], 1]], {Null}]]; Table[f[n], {n, 0, 100}]
    f[n_]:=4 Sum[Length[Divisors[k]], {k, 1, n}] + 4 n + 1 (* Lorenz H. Menke, Jr., Mar 15 2016 *)
  • PARI
    a(n) = 8*sum(k=1, sqrtint(n), n\k) - 4*sqrtint(n)^2 + 4*n + 1 \\ Charles R Greathouse IV, Mar 16 2016

Formula

a(n) = 1 + 4n + 4*Sum_{k=1..n} tau(k), where tau(k) is the number of divisors of k. - Lorenz H. Menke, Jr., Mar 15 2016