[go: up one dir, main page]

login
A277325
Product of nonzero coefficients of the n-th Stern polynomial.
7
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 3, 1, 4, 1, 1, 1, 2, 2, 9, 2, 12, 3, 6, 1, 6, 4, 9, 1, 8, 1, 1, 1, 2, 2, 18, 2, 20, 9, 24, 2, 32, 12, 30, 3, 40, 6, 12, 1, 12, 6, 45, 4, 60, 9, 24, 1, 18, 8, 27, 1, 16, 1, 1, 1, 2, 2, 36, 2, 60, 18, 48, 2, 72, 20, 160, 9, 140, 24, 72, 2, 96, 32, 200, 12, 240, 30, 140, 3, 120, 40, 160, 6, 160, 12, 24, 1
OFFSET
0,6
COMMENTS
a(n) = product of nonzero terms on the n-th row of A125184.
LINKS
FORMULA
a(n) = A005361(A260443(n)).
a(n) = A227349(A277020(n)).
a(2n) = a(n).
a(n) >= A277326(n).
PROG
(Scheme)
(define (A277325 n) (A005361 (A260443 n)))
;; A standalone implementation:
(define (A277325 n) (reduce * 1 (filter positive? (A260443as_coeff_list n))))
(definec (A260443as_coeff_list n) (cond ((zero? n) (list)) ((= 1 n) (list 1)) ((even? n) (cons 0 (A260443as_coeff_list (/ n 2)))) (else (add_two_lists (A260443as_coeff_list (/ (- n 1) 2)) (A260443as_coeff_list (/ (+ n 1) 2))))))
(define (add_two_lists nums1 nums2) (let ((len1 (length nums1)) (len2 (length nums2))) (cond ((< len1 len2) (add_two_lists nums2 nums1)) (else (map + nums1 (append nums2 (make-list (- len1 len2) 0)))))))
CROSSREFS
Cf. also A277326 (lcm of nonzero coefficients) and A002487 (their sum).
Sequence in context: A050431 A051574 A029386 * A240837 A369376 A060502
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 13 2016
STATUS
approved