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!)
A277198 a(n) = gcd(A260443(n), A260443(n+1)). 8

%I #17 Oct 26 2016 15:11:22

%S 1,1,3,1,1,3,15,1,1,15,15,5,5,15,105,1,1,105,75,5,5,375,525,7,7,525,

%T 525,35,35,105,1155,1,1,1155,525,245,35,2625,18375,7,7,91875,13125,35,

%U 245,18375,40425,11,11,40425,25725,245,245,128625,202125,77,77,40425,40425,385,385,1155,15015,1,1,15015,5775,2695,2695,1414875,1414875,77,77

%N a(n) = gcd(A260443(n), A260443(n+1)).

%H Antti Karttunen, <a href="/A277198/b277198.txt">Table of n, a(n) for n = 0..2048</a>

%H <a href="/index/Ga#gcd">Index entries for sequences related to GCD's</a>

%F a(n) = gcd(A260443(n), A260443(n+1)).

%o (Scheme) (define (A277198 n) (gcd (A260443 (+ 1 n)) (A260443 n)))

%o ;; A more practical version, needing only an implementation of A000040:

%o (define (A277198 n) (product_primes_to_kth_powers (gcd_of_exp_lists (A260443as_coeff_list n) (A260443as_coeff_list (+ 1 n)))))

%o (define (product_primes_to_kth_powers nums) (let loop ((p 1) (nums nums) (i 1)) (cond ((null? nums) p) (else (loop (* p (expt (A000040 i) (car nums))) (cdr nums) (+ 1 i))))))

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

%o (define (gcd_of_exp_lists nums1 nums2) (let ((len1 (length nums1)) (len2 (length nums2))) (cond ((< len1 len2) (gcd_of_exp_lists nums2 nums1)) (else (map min nums1 (append nums2 (make-list (- len1 len2) 0)))))))

%o (PARI) A=[];

%o A003961(n)=my(f=factor(n)); f[, 1] = apply(p->nextprime(p+1), f[, 1]); factorback(f)

%o A260443(n)=if(n<3, return(n+1)); if(#A<n, A=concat(A,vector(n-#A))); if(A[n], return(A[n])); A[n]=if(n%2, A260443(n\2)*A260443(n\2+1), A003961(A260443(n/2)))

%o a(n)=gcd(A260443(n), A260443(n+1)) \\ _Charles R Greathouse IV_, Oct 13 2016

%Y Cf. A260443, A277197.

%Y Cf. A277327, A277328 (number of prime factors).

%K nonn

%O 0,3

%A _Antti Karttunen_, Oct 10 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 August 26 03:00 EDT 2024. Contains 375454 sequences. (Running on oeis4.)