OFFSET
1,2
COMMENTS
a(n) encodes in its base-4 representation the succession of modulo 4 residues obtained when map x -> A252463(x), starting from x=n, is iterated down to the eventual 1.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..1024
PROG
(Scheme, with memoization-macro definec)
(Python)
from sympy.core.cache import cacheit
from sympy import factorint, prevprime, prod
def a064989(n):
f = factorint(n)
return 1 if n == 1 else prod(prevprime(i)**f[i] for i in f if i != 2)
def a252463(n): return 1 if n==1 else n//2 if n%2==0 else a064989(n)
@cacheit
def a(n): return 1 if n==1 else 4*a(a252463(n)) + n%4
print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Sep 21 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Sep 15 2017
STATUS
approved