reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
from functools import reduce
n = n + = r
def a(n): return a065642(a065642(a019565(n)))//a019565(n)
print ([a(n) for n in range(101)] ) # Indranil Ghosh, Apr 20 2017
approved
editing
print [a(n) for n in xrangerange(101)] # Indranil Ghosh, Apr 20 2017
proposed
approved
editing
proposed
def a019565(n): return reduce(mul, (prime(i+1) for i, v in enumerate(bin(n)[:1:-1]) if v == '1')) if n > 0 else 1 # This function from _Chai Wah Wu_
(Python)
from operator import mul
from sympy import prime, primefactors
def a019565(n): return reduce(mul, (prime(i+1) for i, v in enumerate(bin(n)[:1:-1]) if v == '1')) if n > 0 else 1
def a007947(n): return 1 if n<2 else reduce(mul, primefactors(n))
def a065642(n):
if n==1: return 1
r=a007947(n)
n = n + r
while a007947(n)!=r:
n+=r
return n
def a(n): return a065642(a065642(a019565(n)))/a019565(n)
print [a(n) for n in xrange(101)] # Indranil Ghosh, Apr 20 2017
approved
editing
proposed
approved