login
A119769
a(n) = (n-1)!*Sum_{k=1..n, gcd(k,n)=1} H(k), where H(k) = Sum_{j=1..k} 1/j, the k-th harmonic number.
1
1, 1, 5, 17, 154, 394, 8028, 38856, 490992, 2995632, 80627040, 355102560, 13575738240, 88085232000, 1686518184960, 26227674547200, 867718162483200, 5518758670387200, 309920046408806400, 2608370444213452800
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
Sequence in context: A160611 A281429 A286307 * A182066 A090886 A097490
KEYWORD
nonn
AUTHOR
Leroy Quet, Jun 19 2006
EXTENSIONS
Extended by Ray Chandler, Jun 20 2006
More terms from Robert G. Wilson v, R. J. Mathar and Joshua Zucker, Jun 20 2006
STATUS
approved