login
A386819
Indices of records in A389240.
2
1, 2, 3, 5, 10, 13, 26, 52, 61, 122, 244, 381, 762, 1021, 2042, 4084, 8168, 16336, 32672, 65344, 130688, 261376, 522752, 1045504, 2091008, 3145725, 6291450, 12582900, 25165800, 50331600, 100663200, 201326400, 268435453, 536870906, 1073741812
OFFSET
1,2
COMMENTS
A389240(n) is the number of steps to reach 1 when the sequence S starts with S(1) = n and is extended with S(m)/2 when S(m) is even, otherwise with S(m) + the smallest odd number not yet added.
EXAMPLE
Let s = A389240.
Table of n, a(n), and s(a(n)) for n <= 12:
n a(n) s(a(n))
--------------
1 1 0
2 2 1
3 3 3
4 5 8
5 10 9
6 13 33
7 26 34
8 52 35
9 61 96
10 122 97
11 244 98
12 381 120
MATHEMATICA
Lim=200000; s=Table[m = -1; If[#[[-1]] == 1, -1 + Length[#], -1] &@ If[n < 5, NestWhileList[If[EvenQ[#], #/2, # + (m += 2)] &, n, # > 1 &], NestWhileList[If[EvenQ[#], #/2, # + (m += 2)] &, n, And[#4 > 1, Nand[#1 == #3 - 2, #2 == #4 - 4]] &, 4]], {n, Lim}]; rec={0}; Ind={1}; Do[If[s[[n]]>rec[[-1]], AppendTo[rec, s[[n]]]; AppendTo[Ind, n]], {n, Lim}]; Ind
CROSSREFS
Sequence in context: A103746 A071848 A268176 * A120938 A120610 A090859
KEYWORD
nonn,more
AUTHOR
James C. McMahon, Oct 07 2025
EXTENSIONS
a(31)-a(35) from Sean A. Irvine, Oct 15 2025
STATUS
approved