[go: up one dir, main page]

login
Revision History for A037454 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) = Sum_{i=0..m} d(i)*6^i, where Sum_{i=0..m} d(i)*3^i is the base 3 representation of n.
(history; published version)
#19 by Peter Luschny at Sun Jan 03 15:38:22 EST 2021
STATUS

editing

approved

#18 by Peter Luschny at Sun Jan 03 15:38:15 EST 2021
PROG

(Julia)

function a(n)

m, r, b = n, 0, 1

while m > 0

m, q = divrem(m, 3)

r += b * q

b *= 6

end

r end; [a(n) for n in 0:57] |> println # Peter Luschny, Jan 03 2021

STATUS

approved

editing

#17 by Bruno Berselli at Thu Dec 01 11:25:12 EST 2016
STATUS

proposed

approved

#16 by Wesley Ivan Hurt at Thu Dec 01 09:57:51 EST 2016
STATUS

editing

proposed

#15 by Wesley Ivan Hurt at Thu Dec 01 09:57:40 EST 2016
MAPLE

seq(n + (1/2)*add(6^k*floor(n/3^k), k = 1..floor(ln(n)/ln(3))), n = 1..100); # - __Peter Bala_, Dec 01 2016

STATUS

proposed

editing

#14 by Peter Bala at Thu Dec 01 09:30:13 EST 2016
STATUS

editing

proposed

#13 by Peter Bala at Thu Dec 01 07:41:39 EST 2016
FORMULA

From Peter Bala, Dec 01 2016: (Start)

a(n) = n + 1/2*Sum_{k >= 1} 6^k*floor(n/3^k). Cf. A037462, A007091 and A102491. - _Peter Bala_, Dec 01 2016

a(0) = 0; a(n) = 6*a(n/3) if n == 0 (mod 3) else a(n) = a(n-1) + 1. (End)

MAPLE

seq(n + (1/2)*add(6^k*floor(n/3^k), k = 1..floor(ln(n)/ln(3))), n = 1..100); # - Peter Bala, Dec 01 2016

#12 by Peter Bala at Thu Dec 01 04:55:30 EST 2016
NAME

a(n) = Sum_{i=0..m} d(i)*6^i: i=0,1,...,m}, , where Sum_{i=0..m} d(i)*3^i: i=0,1,...,m} is the base 3 representation of n.

FORMULA

a(n) = n + 1/2*Sum_{k >= 1} 6^k*floor(n/3^k). Cf. A037462, A007091 and A102491. - Peter Bala, Dec 01 2016

MAPLE

seq(n+(1/2)*add(6^k*floor(n/3^k), k = 1..floor(ln(n)/ln(3))), n = 1..100); # - Peter Bala, Dec 01 2016

CROSSREFS
KEYWORD

nonn,base,easy

STATUS

approved

editing

#11 by Joerg Arndt at Mon Mar 03 01:59:24 EST 2014
STATUS

proposed

approved

#10 by Jon E. Schoenfield at Mon Mar 03 00:46:44 EST 2014
STATUS

editing

proposed

Discussion
Mon Mar 03
01:59
Joerg Arndt: Yes!