|
|
A350278
|
|
Index of first occurrence of n in A349325.
|
|
2
|
|
|
1, 3, 6, 7, 14, 19, 54, 109, 110, 73, 146, 145, 328, 129, 342, 345, 398, 337, 462, 313, 3708, 353, 470, 14673, 5838, 10855, 23718, 14473, 60216, 26283, 60220, 60221, 500726, 155897, 1098404, 445089, 1098406, 1316099, 1168014, 1386505, 3932646, 1169865, 4424230
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(5) = 14 because 5 occurs for the first time at position 14 in A349325.
|
|
MATHEMATICA
|
A349325[n_]:=A349325[n]=Module[{h=1, c=n, prevc=n}, While[c>1, If[OddQ[c], c=(3c+1)/2; If[prevc<n&&c>n, h++], c/=2^IntegerExponent[c, 2]; If[prevc>n&&c<n, h++]]; prevc=c]; h]
nterms=30; Table[i=0; While[A349325[++i]!=n]; i, {n, nterms}]
|
|
PROG
|
(Python)
prevc = c = n
h = 1
while c > 1:
if c % 2:
c = (3*c+1) // 2
if prevc < n and c > n: h += 1
else:
c //= 2
if prevc > n and c < n: h += 1
prevc = c
return h
i = 1
i += 1
return i
print([A349325_fo_idx(n) for n in range(1, 20)])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,hard
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|