OFFSET
1,2
COMMENTS
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,....
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.
It is easy to prove that all the terms a(n) with n >= 10 are congruent to 7 mod 9.
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
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..3000
MAPLE
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
MATHEMATICA
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}]
PROG
(Haskell)
a105801 n = a105801_list !! (n-1)
a105801_list = 1 : 2 : fc 2 1 where
fc x x' = y : fc y x where y = a006370 (x + x')
-- Reinhard Zumkeller, Oct 09 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Sep 12 2006
EXTENSIONS
Incorrect formula deleted by Colin Barker, Jul 29 2013
STATUS
approved