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.

A081403 a(n) = A008475(n^2).

Original entry on oeis.org

0, 4, 9, 16, 25, 13, 49, 64, 81, 29, 121, 25, 169, 53, 34, 256, 289, 85, 361, 41, 58, 125, 529, 73, 625, 173, 729, 65, 841, 38, 961, 1024, 130, 293, 74, 97, 1369, 365, 178, 89, 1681, 62, 1849, 137, 106, 533, 2209, 265, 2401, 629, 298, 185, 2809, 733, 146, 113
Offset: 1

Views

Author

Labos Elemer, Mar 31 2003

Keywords

Examples

			a(1) = 0 since 1 has no prime factor; n = p^2: a(p^2) = p^2; n = 6: a(6) = 4+9 = 13; a(u*w) = a(u)+a(w) if gcd(u,w) = 1; a(21) = a(7)+a(3) = 49+9 = 58; additive with respect of unitary prime divisor decompositions.
		

Crossrefs

Programs

  • Maple
    a:= n-> add(i[1]^i[2], i=ifactors(n^2)[2]):
    seq(a(n), n=1..60);  # Alois P. Heinz, Sep 03 2019
  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] ep[x_] := Table[Part[ffi[x], 2*w], {w, 1, lf[x]}] supo[x_] := Apply[Plus, ba[x]^ep[x]] Table[supo[w], {w, 1, 25}]
  • PARI
    f(n) = { my(f=factor(n)); vecsum(vector(#f~, i, f[i, 1]^f[i, 2])); }; \\ A008475
    a(n) = f(n^2); \\ Michel Marcus, Sep 03 2019
    
  • Python
    from sympy import factorint
    def A081403(n): return sum(p**(e<<1) for p,e in factorint(n).items()) # Chai Wah Wu, Jul 01 2024

Formula

Additive with a(p^e) = p^(2e).