OFFSET
0,3
COMMENTS
Composition of A263273 with the permutation obtained from its odd bisection.
LINKS
PROG
(Python)
from sympy import factorint
from sympy.ntheory.factor_ import digits
from operator import mul
def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
def a038502(n):
f=factorint(n)
return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
def a038500(n): return n/a038502(n)
def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
def a264985(n): return (a263273(2*n + 1) - 1)/2
def a(n): return a264985(a263273(n)) # Indranil Ghosh, May 22 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Dec 07 2015
STATUS
approved