login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Fibonacci-Collatz sequence: a(1)=1, a(2)=2; for n > 2, let fib = a(n-1) + a(n-2); if fib is odd then a(n) = 3*fib + 1 else a(n) = fib/2.
7

%I #36 Sep 09 2017 20:15:32

%S 1,2,10,6,8,7,46,160,103,790,2680,1735,13246,44944,29095,222118,

%T 753640,487879,3724558,12637312,8180935,62454742,211907032,137180887,

%U 1047263758,3553333936,2300298847,17560898350,59583591592,38572244971

%N Fibonacci-Collatz sequence: a(1)=1, a(2)=2; for n > 2, let fib = a(n-1) + a(n-2); if fib is odd then a(n) = 3*fib + 1 else a(n) = fib/2.

%C Taking a(1)=1, a(2)=1 leads to the all-ones sequence 1,1,1,1,1,1,... (A000012); similarly a(1)=a(2)=b gives "all b's" sequence b,b,b,b,b,....

%C Apparently, for n > 2, the sequence is periodic modulo 2 with period 3. However, this regularity is disrupted when starting at a(34)=4937737952464 a run of 6 even terms appears.

%C It is easy to prove that all the terms a(n) with n >= 10 are congruent to 7 mod 9.

%C Conjecture: for every k > 0 there is an index m such that all the a(n) with n > m have the same residue mod 3^k. - _Giovanni Resta_, Nov 17 2010

%H N. J. A. Sloane, <a href="/A105801/b105801.txt">Table of n, a(n) for n = 1..3000</a>

%p M:=3000: a:=1: b:=2: lprint(1,1): lprint(2,2): for n from 3 to M do c:=a+b: if (c mod 2) = 0 then d:=c/2 else d:=3*c+1: fi: lprint(n,d): a:=b: b:=d: od: # _N. J. A. Sloane_, Nov 20 2010

%t a[1]=1; a[2]=2; a[n_]:=a[n]=(fib=a[n-1]+a[n-2]; col=If[OddQ[fib],3*fib+1,fib/2]); Table[a[n],{n,30}]

%o (PARI) A105801(n)=if(n<3,if(n<2,1,2),f=A105801(n-1)+A105801(n-2); if(f%2,3*f+1,f/2))

%o (Haskell)

%o a105801 n = a105801_list !! (n-1)

%o a105801_list = 1 : 2 : fc 2 1 where

%o fc x x' = y : fc y x where y = a006370 (x + x')

%o -- _Reinhard Zumkeller_, Oct 09 2011

%Y Cf. A000012, A000045, A006370, A181663.

%Y Cf. A181717.

%K nonn

%O 1,2

%A _Zak Seidov_, Sep 12 2006

%E Incorrect formula deleted by _Colin Barker_, Jul 29 2013