login
A276081
a(n) = A276075(A260443(n)).
6
0, 1, 2, 3, 6, 5, 8, 9, 24, 11, 14, 13, 30, 17, 32, 33, 120, 35, 38, 25, 54, 27, 44, 43, 144, 47, 62, 49, 150, 65, 152, 153, 720, 155, 158, 73, 174, 63, 92, 79, 264, 81, 98, 71, 198, 87, 188, 187, 840, 191, 206, 109, 294, 111, 212, 199, 864, 215, 302, 217, 870, 305, 872, 873, 5040, 875, 878, 313, 894, 231, 332, 247, 984, 237, 266, 155, 438, 171
OFFSET
0,3
LINKS
FORMULA
a(n) = A276075(A260443(n)).
PROG
(Scheme)
(define (A276081 n) (A276075 (A260443 n)))
;; A more practical standalone program, that uses memoization-macro definec:
(define (A276081 n) (sum_factorials_times_elements_in (A260443as_index_lists n)))
(definec (A260443as_index_lists n) (cond ((zero? n) (list)) ((= 1 n) (list 1)) ((even? n) (cons 0 (A260443as_index_lists (/ n 2)))) (else (add_two_lists (A260443as_index_lists (/ (- n 1) 2)) (A260443as_index_lists (/ (+ 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)))))))
(define (sum_factorials_times_elements_in nums) (let loop ((s 0) (nums nums) (i 2) (f 1)) (cond ((null? nums) s) (else (loop (+ s (* (car nums) f)) (cdr nums) (+ 1 i) (* i f))))))
(Python)
from sympy import factorint, factorial as f, prime, primepi
from operator import mul
from functools import reduce
def a003961(n):
F=factorint(n)
return 1 if n==1 else reduce(mul, [prime(primepi(i) + 1)**F[i] for i in F])
def a260443(n): return n + 1 if n<2 else a003961(a260443(n//2)) if n%2==0 else a260443((n - 1)//2)*a260443((n + 1)//2)
def a276075(n):
F=factorint(n)
return 0 if n==1 else sum([F[i]*f(primepi(i)) for i in F])
def a(n): return a276075(a260443(n))
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 21 2017
CROSSREFS
Cf. also A276080.
Sequence in context: A048750 A344403 A326136 * A329564 A257011 A144652
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Aug 18 2016
STATUS
approved