OFFSET
1,1
COMMENTS
Begin with n and repeat the following procedure until 1 is reached: If n is divisible by 3 then apply n -> n/3. Otherwise, alternately apply n -> 2*n+2 and n -> 2*n+1. Then a(n) is the sum of the numbers produced by this process, including n and 1. - David Radcliffe, Aug 28 2025
LINKS
Enoch Haga, Problem, School Science and Mathematics, Nov 1983, vol. 83, no 7, page 628.
Sean A. Irvine, Java program (github)
LaBar, Problem #3929, School Science and Mathematics, Dec 1982, vol. 82 no 8, page 715.
EXAMPLE
Beginning at n=1, algorithm produces s+t+a=18.
a(2) = 44 because the trajectory of n=2 is (2, 6, 2, 5, 12, 4, 9, 3, 1) and these numbers sum to 44. - David Radcliffe, Aug 28 2025
PROG
(Python)
def A049067(n):
s = n
c = 2
while n > 1 or s == n:
if n % 3 == 0:
n //= 3
else:
n = 2*n + c
c = 3 - c
s += n
return s # David Radcliffe, Aug 28 2025
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
STATUS
approved
