login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A277326 LCM of nonzero coefficients of the n-th Stern polynomial. 6

%I #8 Oct 26 2016 15:18:26

%S 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,

%T 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,

%U 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

%N LCM of nonzero coefficients of the n-th Stern polynomial.

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

%H Antti Karttunen, <a href="/A277326/b277326.txt">Table of n, a(n) for n = 0..8192</a>

%H <a href="/index/Lc#lcm">Index entries for sequences related to lcm's</a>

%F a(n) = A072411(A260443(n)).

%F a(2n) = a(n).

%F a(n) <= A277325(n).

%o (Scheme)

%o (define (A277326 n) (A072411 (A260443 n)))

%o ;; A standalone implementation:

%o (define (A277326 n) (reduce lcm 1 (filter positive? (A260443as_coeff_list n))))

%o (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))))))

%o (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)))))))

%Y Cf. A072411, A125184, A260443.

%Y Differs from A277325 for the first time at n=13, where a(13) = 2, while A277325(13) = 4.

%Y After n=0, differs from A277315 for the first time at n=21, where a(21) = 12, while A277315(21) = 4.

%K nonn

%O 0,6

%A _Antti Karttunen_, Oct 13 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 12:08 EDT 2024. Contains 371912 sequences. (Running on oeis4.)