cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A277326 LCM of nonzero coefficients of the n-th Stern polynomial.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 3, 1, 2, 1, 1, 1, 2, 2, 3, 2, 12, 3, 6, 1, 6, 2, 3, 1, 2, 1, 1, 1, 2, 2, 6, 2, 20, 3, 12, 2, 4, 12, 30, 3, 20, 6, 6, 1, 6, 6, 15, 2, 60, 3, 12, 1, 6, 2, 3, 1, 2, 1, 1, 1, 2, 2, 6, 2, 60, 6, 12, 2, 12, 20, 40, 3, 140, 12, 12, 2, 12, 4, 40, 12, 60, 30, 140, 3, 60, 20, 40, 6, 20, 6, 6, 1
Offset: 0

Views

Author

Antti Karttunen, Oct 13 2016

Keywords

Comments

a(n) = the least common multiple of nonzero terms on the n-th row of A125184.

Crossrefs

Differs from A277325 for the first time at n=13, where a(13) = 2, while A277325(13) = 4.
After n=0, differs from A277315 for the first time at n=21, where a(21) = 12, while A277315(21) = 4.

Programs

  • Scheme
    (define (A277326 n) (A072411 (A260443 n)))
    ;; A standalone implementation:
    (define (A277326 n) (reduce lcm 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)))))))

Formula

a(n) = A072411(A260443(n)).
a(2n) = a(n).
a(n) <= A277325(n).