A248797 Number of terms > 1 in Fibonacci-variation of Collatz sequence starting with (1, 2n+1).
0, 1, 2, 1, 5, 5, 4, 1, 8, 3, 2, 3, 3, 5, 5, 1, 10, 4, 7, 3, 9, 7, 5, 4, 7, 2, 3, 11, 10, 12, 7, 1, 12, 6, 4, 6, 17, 10, 9, 6, 13, 5, 2, 4, 10, 10, 7, 7, 5, 6, 11, 8, 7, 15, 7, 10, 15, 9, 12, 9, 17, 8, 14, 1, 16, 8, 6, 5, 11, 12, 8, 8, 11, 13, 8, 9, 8, 12, 4
Offset: 0
Keywords
Examples
a(8)=8 as the Fibonacci-Collatz sequence starting with 1, 17 becomes 1, 17, 9, 13, 11, 3, 7, 5, 3, 1 and has 8 terms > 1.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..20000
Programs
-
Maple
b:= proc(i, j) local m, r; m:= i+j; while irem(m, 2, 'r')=0 do m:=r od; m end: a:= proc(n) local i, j, k; i, j:= 1, 2*n+1; for k from 0 while j<>1 do i, j:= j, b(i, j) od; k end: seq(a(n), n=0..100); # Alois P. Heinz, Mar 15 2015
-
Mathematica
b[i_, j_] := Module[{m, r}, m = i+j; While[Mod[m, 2] == 0, r = Quotient[m, 2]; m = r]; m]; a[n_] := Module[{i, j, k}, {i, j} = {1, 2*n+1}; For[k = 0, j != 1, {i, j} = {j, b[i, j]}; k++]; k]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 21 2025, after Alois P. Heinz *)
Comments