

A275748


Number of Fibonacci numbers in {n, f(n), f(f(n)), ...., 1}, where f is the Collatz function.


0



1, 2, 5, 2, 4, 5, 6, 3, 6, 4, 6, 5, 5, 6, 4, 3, 5, 6, 6, 4, 4, 6, 4, 5, 6, 5, 6, 6, 6, 4, 6, 3, 6, 6, 4, 6, 6, 6, 7, 4, 6, 4, 6, 6, 6, 4, 6, 5, 6, 6, 6, 5, 4, 6, 7, 6, 6, 6, 7, 4, 4, 6, 6, 3, 6, 6, 6, 6, 5, 4, 6, 6, 7, 6, 3, 6, 6, 7, 6, 4, 4, 6, 6, 4, 3, 6, 6, 6, 7, 6, 6, 4, 4, 6, 6, 5, 7, 6, 6, 6
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Or number of Fibonacci numbers in the trajectory of n under the 3x+1 map (i.e. the number of Fibonacci numbers until the trajectory reaches 1).


LINKS



EXAMPLE

The finite sequence n, f(n), f(f(n)), ...., 1 for n = 9 is: 9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1 which has six Fibonacci numbers {1, 2, 5, 8, 13, 34}. Hence a(9) = 6.


MATHEMATICA

s = Fibonacci /@ Range@ 20; Table[Length@ Select[Union@ NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # != 1 &], MemberQ[s, #] &], {n, 120}] (* Michael De Vlieger, Aug 07 2016 *)


PROG

(PARI) print1(1, ", "); for(n=2, 100, s=n; t=1; while(s!=1, if(issquare(5*s^2+4) issquare(5*s^24), t++, t=t); if(s%2==0, s=s/2, s=(3*s+1)); if(s==1, print1(t, ", "); ); ))


CROSSREFS



KEYWORD

nonn,easy


AUTHOR



STATUS

approved



