OFFSET
0,4
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
FORMULA
a(n) mod 2 = A292077(n+1). - Alois P. Heinz, Jul 01 2023
a(2*n) = n; a(2*n+1) = 3 * a(n) + 1. - Ruud H.G. van Tol, Aug 31 2024
MAPLE
a:= n-> `if`(n::odd, a((3*n+1)/2), n/2):
seq(a(n), n=0..100); # Alois P. Heinz, Jul 01 2023
PROG
(PARI) a(n) = ((3/2)^valuation(n++, 2)*n-1)/2; \\ Ruud H.G. van Tol, Aug 30 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 11 2003
STATUS
approved