cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A049067 LaBar's conjecture (steps to return n to 1 after division by 3 and, if needed, multiplication by 2, addition of 1 or 2).

This page as a plain text file.
%I A049067 #31 Sep 03 2025 22:22:04
%S A049067 18,44,4,216,34,50,181,68,13,126,125,228,278,256,49,364,82,68,180,575,
%T A049067 202,1033,245,92,403,140,40,520,499,156,872,214,158,1400,221,264,399,
%U A049067 368,317,1157,390,298,648,376,94,594,1155,412,1983,500,133,808,226,122
%N A049067 LaBar's conjecture (steps to return n to 1 after division by 3 and, if needed, multiplication by 2, addition of 1 or 2).
%C A049067 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
%H A049067 Enoch Haga, <a href="https://doi.org/10.1111/j.1949-8594.1983.tb10148.x">Problem</a>, School Science and Mathematics, Nov 1983, vol. 83, no 7, page 628.
%H A049067 Sean A. Irvine, <a href="https://github.com/archmageirvine/joeis/blob/master/src/irvine/oeis/a049/A049067.java">Java program</a> (github)
%H A049067 LaBar, <a href="https://doi.org/10.1111/j.1949-8594.1982.tb10084.x">Problem #3929</a>, School Science and Mathematics, Dec 1982, vol. 82 no 8, page 715.
%e A049067 Beginning at n=1, algorithm produces s+t+a=18.
%e A049067 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
%o A049067 (Python)
%o A049067 def A049067(n):
%o A049067     s = n
%o A049067     c = 2
%o A049067     while n > 1 or s == n:
%o A049067         if n % 3 == 0:
%o A049067             n //= 3
%o A049067         else:
%o A049067             n = 2*n + c
%o A049067             c = 3 - c
%o A049067         s += n
%o A049067     return s # _David Radcliffe_, Aug 28 2025
%Y A049067 Cf. A049074.
%K A049067 easy,nonn,changed
%O A049067 1,1
%A A049067 _Enoch Haga_