OFFSET
1,3
MAPLE
H := proc(n::integer) RETURN( sum('1/j', j=1..n) ) ; end: A119769 := proc(n::integer) local resul, k ; resul :=0 ; for k from 1 to n do if gcd(k, n) = 1 then resul := resul+H(k) ; fi ; od : RETURN((n-1)!*resul) ; end: for n from 1 to 30 do printf("%d, ", A119769(n)) ; od: # R. J. Mathar, Jun 21 2006
MATHEMATICA
f[n_] := (n - 1)!Sum[If[GCD[k, n] == 1, HarmonicNumber[k], 0], {k, n}]; Array[f, 21] (* Robert G. Wilson v, Jun 20 2006 *)
PROG
(PLT Scheme) ;; harmonic is the sum of reciprocals, ! has the obvious definition.
(define (A119769 n)
(* (! (sub1 n))
(apply + (map harmonic (filter (lambda (k) (= 1 (gcd n k))) (build-list n (lambda (k) (add1 k))))))))
(build-list 30 (lambda (n) (A119769 (add1 n)))) ;; Joshua Zucker, Jun 21 2006
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jun 19 2006
EXTENSIONS
Extended by Ray Chandler, Jun 20 2006
STATUS
approved