OFFSET
1,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
J. Bamberg, G. Cairns and D. Kilminster, The crystallographic restriction, permutations and Goldbach's conjecture, Amer. Math. Monthly, 110 (March 2003), 202-209.
Savinien Kreczman, Luca Prigioniero, Eric Rowland, and Manon Stipulanti, Magic numbers in periodic sequences, Univ. Liège (Belgium, 2023). See p. 7.
FORMULA
For n > 2, a(2^r) = 2^(r-1) with r>1, a(p^r) = phi(p^r) with p > 2 prime, r >= 1, where phi is Euler's function A000010; in general if a(Product p_i^e_i) = Sum a(p_i^e_i).
MATHEMATICA
a[1] = a[2] = 0; a[p_?PrimeQ] := a[p] = p-1; a[n_] := a[n] = If[Length[fi = FactorInteger[n]] == 1, EulerPhi[n], Total[a /@ (fi[[All, 1]]^fi[[All, 2]])]]; Table[a[n], {n, 1, 78}] (* Jean-François Alcover, Jun 20 2012 *)
PROG
(PARI) for(n=1, 78, k=0; if(n>1, f=factor(n); k=sum(j=1, matsize(f)[1], eulerphi(f[j, 1]^f[j, 2])); if(f[1, 1]==2&&f[1, 2]==1, k--)); print1(k, ", ")) \\ Klaus Brockhaus, Mar 10 2003
(Haskell)
a080737 n = a080737_list !! (n-1)
a080737_list = 0 : (map f [2..]) where
f n | mod n 4 == 2 = a080737 $ div n 2
| otherwise = a067240 n
-- Reinhard Zumkeller, Jun 13 2012, Jun 11 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 08 2003
EXTENSIONS
More terms from Klaus Brockhaus, Mar 10 2003
STATUS
approved