login
A277011
Left inverse of A277012.
3
0, 1, 2, 2, 6, 3, 4, 3, 24, 7, 8, 4, 12, 5, 6, 4, 120, 25, 26, 8, 30, 9, 10, 5, 48, 13, 14, 6, 18, 7, 8, 5, 720, 121, 122, 26, 126, 27, 28, 9, 144, 31, 32, 10, 36, 11, 12, 6, 240, 49, 50, 14, 54, 15, 16, 7, 72, 19, 20, 8, 24, 9, 10, 6, 5040, 721, 722, 122, 726, 123, 124, 27, 744, 127, 128, 28, 132, 29, 30, 10, 840, 145, 146, 32
OFFSET
0,3
FORMULA
a(n) = A276075(A005940(1+n)).
For all n >= 0, a(A277012(n)) = n.
PROG
(Scheme)
;; Standalone iterative implementation:
(define (A277011 n) (let loop ((s 0) (n n) (r 0) (i 2) (f 1)) (cond ((zero? n) (+ s (* r f))) ((even? n) (loop (+ s (* r f)) (/ n 2) 0 (+ 1 i) (* i f))) (else (loop s (/ (- n 1) 2) (+ 1 r) i f)))))
CROSSREFS
Left inverse of A277012.
Cf. also A277007.
Sequence in context: A298983 A128623 A182701 * A277021 A275037 A174833
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Sep 25 2016
STATUS
approved