OFFSET
1,2
LINKS
FORMULA
PROG
(Scheme, two versions)
(Python)
from sympy import factorint, nextprime
from operator import mul
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 a254104(n):
if n==0: return 0
if n%3==0: return 1 + 2*a254104(2*n/3 - 1)
elif n%3==1: return 1 + 2*a254104(2*(n - 1)/3)
else: return 2*a254104((n - 2)/3 + 1)
def a254115(n): return a254104(a048673(n))
def a(n): return (a254115(2*n + 1) - 1)/2 # Indranil Ghosh, Jun 06 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 05 2015
STATUS
approved