login
A264987
Odd bisection of A263272.
4
1, 3, 5, 11, 9, 7, 13, 15, 23, 29, 33, 17, 35, 27, 19, 37, 21, 25, 31, 39, 41, 95, 45, 59, 113, 69, 77, 83, 87, 47, 101, 99, 65, 119, 51, 71, 89, 105, 53, 107, 81, 55, 109, 57, 73, 91, 111, 43, 97, 63, 61, 115, 75, 79, 85, 93, 49, 103, 117, 67, 121, 123, 203, 257, 285, 149, 311, 135, 167, 329, 177, 221, 275
OFFSET
0,2
FORMULA
a(n) = A263272((2*n)+1).
PROG
(Scheme) (define (A264987 n) (A263272 (+ 1 n n)))
(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 a(n): return a263273(2*(2*n + 1))/2 # Indranil Ghosh, May 23 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 05 2015
STATUS
approved