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.

A080736 Multiplicative function defined by a(1)=1, a(2)=0, a(2^r) = phi(2^r) (r>1), a(p^r) = phi(p^r) (p odd prime, r>=1), where phi is Euler's function A000010.

Original entry on oeis.org

1, 0, 2, 2, 4, 0, 6, 4, 6, 0, 10, 4, 12, 0, 8, 8, 16, 0, 18, 8, 12, 0, 22, 8, 20, 0, 18, 12, 28, 0, 30, 16, 20, 0, 24, 12, 36, 0, 24, 16, 40, 0, 42, 20, 24, 0, 46, 16, 42, 0, 32, 24, 52, 0, 40, 24, 36, 0, 58, 16, 60, 0, 36, 32, 48, 0, 66, 32, 44, 0, 70, 24, 72, 0, 40, 36, 60, 0, 78, 32
Offset: 1

Views

Author

N. J. A. Sloane, Mar 08 2003

Keywords

Crossrefs

Programs

  • Haskell
    a080736 n = if n `mod` 4 == 2 then 0 else a000010 n
    -- Reinhard Zumkeller, Jun 13 2012, Jun 11 2012
  • Mathematica
    a[n_] := If[Mod[n, 4] == 2, 0, EulerPhi[n]]; Array[a, 100] (* Amiram Eldar, Nov 02 2023 *)
  • PARI
    {for(n=1,81,f=factor(n); print1(if(n==1,1,if(f[1,1]==2&&f[1,2]==1,0,prod(j=1,matsize(f)[1],eulerphi(f[j,1]^f[j,2])))),","))}
    

Formula

a(A016825(n)) = 0; a(A000040(n)) = A000040(n) - 1. - Reinhard Zumkeller, Jun 11 2012
a(n) = if n mod 4 = 2 then 0 else A000010(n). - Reinhard Zumkeller, Jun 13 2012
From Amiram Eldar, Nov 02 2023: (Start)
Multiplicative with a(2) = 0, a(2^e) = 2^(e-1) for e >= 2, and a(p^e) = (p-1)*p^(e-1) for an odd prime p.
Dirichlet g.f.: (1 - 2^(1-s) + 1/(2^s-1)) * zeta(s-1) / zeta(s).
Sum_{k=1..n} a(k) ~ (5/(2*Pi^2)) * n^2. (End)

Extensions

More terms and PARI code from Klaus Brockhaus, Mar 10 2003