######################################################### # # # Coded by Indranil Ghosh (indranilg49@gmail.com) # # # ######################################################### #Python 2.7.11, OEIS sequence: A243505 from sympy import factorint, prevprime, prime, primefactors from operator import mul def a001222(n): return 0 if n==1 else a001222(n/primefactors(n)[0]) + 1 def a052126(n): return 1 if n==1 else n/primefactors(n)[-1] 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 a052126(a122111(2*n - 1)) print [a(n) for n in xrange(1, 101)]