|
|
A070168
|
|
Irregular triangle of Terras-modified Collatz problem.
|
|
16
|
|
|
1, 2, 1, 3, 5, 8, 4, 2, 1, 4, 2, 1, 5, 8, 4, 2, 1, 6, 3, 5, 8, 4, 2, 1, 7, 11, 17, 26, 13, 20, 10, 5, 8, 4, 2, 1, 8, 4, 2, 1, 9, 14, 7, 11, 17, 26, 13, 20, 10, 5, 8, 4, 2, 1, 10, 5, 8, 4, 2, 1, 11, 17, 26, 13, 20, 10, 5, 8, 4, 2, 1, 12, 6, 3, 5, 8, 4, 2, 1, 13, 20, 10, 5, 8, 4, 2, 1, 14, 7, 11
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
See Lagarias, pp. 4-7, eqs. (2.1), (2.4) with (2.5) and (2.6).
T(n,k) = T^{(k)}(n), with the iterations of the Terras-modified Collatz map: T(n) = n/2 if n is even and otherwise (3*n+1)/2, n >= 1. T^{(0)}(n) = n.
T(n,k) = lambda(n,k)*n + rho(n,k), with lambda(n,k) = (3^X(n,k,-1))/2^k and rho(n,k) = sum(x(n,j)*(3^X(n,k,j))/ 2^(k-j), j=0..(k-1)) with X(n,k,j) = sum(x(n,j+p), p=1.. (k-1-j)) where x(n,j) = T^{(j)}(n) (mod 2). The parity sequence suffices to determine T(n,k).
(End)
|
|
EXAMPLE
|
The irregular triangle begins:
n\k 0 1 2 3 4 5 6 8 9 10 11 12 13 14 ...
1: 1
2: 2 1
3: 3 5 8 4 2 1
4: 4 2 1
5: 5 8 4 2 1
6: 6 3 5 8 4 2 1
7: 7 11 17 26 13 20 10 5 8 4 2 1
8: 8 4 2 1
9: 9 14 7 11 17 26 13 20 10 5 8 4 2 1
10: 10 5 8 4 2 1
11: 11 17 26 13 20 10 5 8 4 2 1
12: 12 6 3 5 8 4 2 1
13: 13 20 10 5 8 4 2 1
14: 14 7 11 17 26 13 20 10 5 8 4 2 1
15: 15 23 35 53 80 40 20 10 5 8 4 2 1
-------------------------------------------------------------
|
|
MATHEMATICA
|
f[n_] := If[EvenQ[n], n/2, (3 n + 1)/2];
Table[NestWhileList[f, n, # != 1 &], {n, 1, 30}] // Grid (* Geoffrey Critzer, Oct 18 2014 *)
|
|
PROG
|
(Haskell)
a070168 n k = a070168_tabf !! (n-1) !! (k-1)
a070168_tabf = map a070168_row [1..]
a070168_row n = (takeWhile (/= 1) $ iterate a014682 n) ++ [1]
a070168_list = concat a070168_tabf
(Python)
def a(n):
if n==1: return [1]
l=[n, ]
while True:
if n%2==0: n//=2
else: n = (3*n + 1)//2
l.append(n)
if n<2: break
return l
|
|
CROSSREFS
|
Cf. A070165 (ordinary Collatz case).
|
|
KEYWORD
|
nonn,easy,tabf
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Name shortened, tabl changed into tabf, Cf. added by Wolfdieter Lang, Mar 20 2014
|
|
STATUS
|
approved
|
|
|
|