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.

A264786 Let { d_1, d_2, ..., d_k } be the divisors of n. Then a(n) = d_k^1 + d_(k-1)^2 + ... + d_1^k.

Original entry on oeis.org

1, 3, 4, 9, 6, 24, 8, 33, 19, 44, 12, 226, 14, 72, 68, 161, 18, 429, 20, 534, 98, 152, 24, 3858, 51, 204, 136, 856, 30, 6534, 32, 1089, 182, 332, 210, 22965, 38, 408, 236, 12886, 42, 14262, 44, 2148, 1868, 584, 48, 128338, 99, 2333, 368, 3214, 54, 21810, 302
Offset: 1

Views

Author

Keywords

Examples

			For n = 4: a(4) = 4^1 + 2^2 + 1^3 = 9.
For n = 5: a(5) = 5^1 + 1^2 = 6.
For n = 6: a(6) = 6^1 + 3^2 + 2^3 + 1^4 = 24.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Sort[Divisors[n], #1 > #2 &][[i]]^i, {i, DivisorSigma[0, n]}]; Table[a[n], {n, 60}]
  • PARI
    a(n) = my(d = divisors(n)); sum(k=1, #d, d[k]^(#d-k+1)); \\ Michel Marcus, Jan 01 2016