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.

A304408 If n = Product (p_j^k_j) then a(n) = Product ((p_j - 1)*(k_j + 1)).

Original entry on oeis.org

1, 2, 4, 3, 8, 8, 12, 4, 6, 16, 20, 12, 24, 24, 32, 5, 32, 12, 36, 24, 48, 40, 44, 16, 12, 48, 8, 36, 56, 64, 60, 6, 80, 64, 96, 18, 72, 72, 96, 32, 80, 96, 84, 60, 48, 88, 92, 20, 18, 24, 128, 72, 104, 16, 160, 48, 144, 112, 116, 96, 120, 120, 72, 7, 192, 160, 132, 96, 176, 192
Offset: 1

Views

Author

Ilya Gutkovskiy, May 12 2018

Keywords

Examples

			a(20) = a(2^2*5) = (2 - 1)*(2 + 1) * (5 - 1)*(1 + 1) = 24.
		

Crossrefs

Programs

  • Maple
    a:= n-> mul((i[1]-1)*(i[2]+1), i=ifactors(n)[2]):
    seq(a(n), n=1..80);  # Alois P. Heinz, Jan 05 2021
  • Mathematica
    a[n_] := Times @@ ((#[[1]] - 1) (#[[2]] + 1) & /@ FactorInteger[n]); a[1] = 1; Table[a[n], {n, 70}]
    Table[DivisorSigma[0, n] EulerPhi[Last[Select[Divisors[n], SquareFreeQ]]], {n, 70}]
  • PARI
    a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); (p-1)*(e+1))} \\ Andrew Howroyd, Jul 24 2018

Formula

a(n) = A000005(n)*abs(A023900(n)) = A000005(n)*A173557(n) = A000005(n)*A000010(A007947(n)).
a(p^k) = (p - 1)*(k + 1) where p is a prime and k > 0.
a(n) = 2^omega(n)*phi(n) if n is a squarefree (A005117), where omega() = A001221 and phi() = A000010.