OFFSET
1,2
LINKS
FORMULA
PROG
(PARI)
default(primelimit, 2^30);
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
for(n=1, 8192, write("b254116.txt", n, " ", A254116(n)));
(Python)
from sympy import factorint, prevprime, floor
from operator import mul
def a064216(n):
f=factorint(2*n - 1)
return 1 if n==1 else reduce(mul, [prevprime(i)**f[i] for i in f])
def a254103(n):
if n==0: return 0
if n%2==0: return 3*a254103(n/2) - 1
else: return floor((3*(1 + a254103((n - 1)/2)))/2)
def a(n): return a064216(a254103(n)) # Indranil Ghosh, Jun 06 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 04 2015
STATUS
approved