######################################################### # # # Coded by Indranil Ghosh (indranilg49@gmail.com) # # # ######################################################### #Python 2.7.11, OEIS sequence: A243506 from sympy import factorint, nextprime, prevprime, prime, primefactors from operator import mul def a001222(n): return 0 if n==1 else a001222(n/primefactors(n)[0]) + 1 def a048673(n): f=factorint(n) return 1 if n==1 else (1 + reduce(mul, [nextprime(i)**f[i] for i in f]))/2 def a064989(n): f=factorint(n) return 1 if n==1 else reduce(mul, [1 if i==2 else prevprime(i)**f[i] for i in f]) def a105560(n): return 1 if n==1 else prime(a001222(n)) def a122111(n): return 1 if n==1 else a105560(n)*a122111(a064989(n)) def a(n): return a048673(a122111(n)) print [a(n) for n in xrange(1, 101)]