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.

Showing 1-2 of 2 results.

A350223 a(n) = Sum_{k=1..n} (-1)^(k+1) * floor((n/k)^k).

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 2, 0, 2, 2, 3, 0, 3, 2, 4, -1, 2, 1, 1, 0, 3, 2, 2, -2, 2, -1, 2, 2, 2, -1, 3, -1, 7, 2, 2, 0, 3, 2, 4, -2, 3, -1, 1, 1, 0, 3, 5, -1, 4, 1, 1, -2, 1, 1, 5, -2, 4, -1, 4, 0, 3, 1, 1, -1, 2, 1, 3, -1, 6, -1, 2, -5, 7, 0, 1, -1, 4, -2, 8, -5, 2, 4, 1, 3, 2, 4, 2, -3, 1, 0, 2, -1, 3, 4, 0, -6, 2, -1, 6, 3, 3, 1, 5, -6, 9
Offset: 1

Views

Author

Seiichi Manyama, Dec 20 2021

Keywords

Examples

			a(3) = [3/1] - [(3/2)^2] + [(3/3)^3] = 3 - 2 + 1 = 2.
a(4) = [4/1] - [(4/2)^2] + [(4/3)^3] - [(4/4)^4] = 4 - 4 + 2 - 1 = 1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[(-1)^(k + 1)*Floor[(n/k)^k], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, Dec 20 2021 *)
  • PARI
    a(n) = sum(k=1, n, (-1)^(k+1)*(n^k\k^k));

A347416 a(n) = Sum_{k=1..n} floor((n/k)^n).

Original entry on oeis.org

1, 5, 31, 276, 3238, 47463, 830415, 16845619, 388198577, 10009945747, 285452668383, 8918294580680, 302912273410475, 11112687415252836, 437907284782655738, 18447025981637731050, 827246579683710818081, 39346558272075085340201, 1978423430905859200399397
Offset: 1

Views

Author

Seiichi Manyama, Aug 31 2021

Keywords

Examples

			a(3) = [(3/1)^3] + [(3/2)^3] + [(3/3)^3] = 27 + 3 + 1 = 31.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Floor[(n/k)^n], {k, 1, n}]; Array[a, 20] (* Amiram Eldar, Aug 31 2021 *)
  • PARI
    a(n) = sum(k=1, n, n^n\k^n);

Formula

a(n) ~ n^n. - Vaclav Kotesovec, Sep 14 2021
Showing 1-2 of 2 results.