login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A359247
The bottom entry in the absolute difference triangle of the elements in the Collatz trajectory of n.
3
1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0
OFFSET
1,136
FORMULA
a(2^n) = 1.
EXAMPLE
a(3) = 1 because the Collatz trajectory of 3 is T = [3, 10, 5, 16, 8, 4, 2, 1], and the absolute difference triangle of the elements of T is:
3 . 10 . 5 . 16 . 8 . 4 . 2 . 1
7 . 5 . 11 . 8 . 4 . 2 . 1
2 . 6 . 3 . 4 . 2 . 1
4 . 3 . 1 . 2 . 1
1 . 2 . 1 . 1
1 . 1 . 0
0 . 1
1
with bottom entry a(3) = 1.
MATHEMATICA
Collatz[n_]:=NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #>1&]; Flatten[Table[Collatz[n], {n, 10}]]; Table[d=Collatz[m]; While[Length[d]>1, d=Abs[Differences[d]]]; d[[1]], {m, 100}]
PROG
(PARI) a(n) = my(list=List([n])); while (n!=1, if(n%2, n=3*n+1, n=n/2); listput(list, n)); my(v = Vec(list)); while (#v != 1, v = vector(#v-1, k, abs(v[k+1]-v[k]))); v[1]; \\ Michel Marcus, Dec 23 2022
CROSSREFS
Sequence in context: A189289 A270885 A353682 * A127972 A103451 A103452
KEYWORD
nonn
AUTHOR
Michel Lagneau, Dec 22 2022
STATUS
approved