login
A098816
a(1)=0, a(2)=1, a(n) = ceiling((3/2) * |a(n-1) - a(n-2)|).
1
0, 1, 2, 2, 0, 3, 5, 3, 3, 0, 5, 8, 5, 5, 0, 8, 12, 6, 9, 5, 6, 2, 6, 6, 0, 9, 14, 8, 9, 2, 11, 14, 5, 14, 14, 0, 21, 32, 17, 23, 9, 21, 18, 5, 20, 23, 5, 27, 33, 9, 36, 41, 8, 50, 63, 20, 65, 68, 5, 95, 135, 60, 113, 80, 50, 45, 8, 56, 72, 24, 72, 72, 0, 108, 162, 81, 122, 62, 90, 42, 72, 45, 41, 6, 53, 71, 27, 66, 59, 11
OFFSET
1,3
COMMENTS
Sequence becomes periodic with period 193.
For which values of lambda does the sequence (f(n)) defined by f(1)=0, f(2)=1, f(n) = ceiling(lambda * |f(n-1) - f(n-2)|) ultimately become periodic?
LINKS
FORMULA
For n >= 19, a(n+193) = a(n).
MATHEMATICA
RecurrenceTable[{a[1]==0, a[2]==1, a[n]==Ceiling[3/2 Abs[a[n-1]-a[n-2]]]}, a, {n, 90}] (* Harvey P. Dale, Mar 14 2015 *)
CROSSREFS
Sequence in context: A188333 A283269 A201947 * A214639 A319495 A216973
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Nov 02 2004
EXTENSIONS
Corrected and extended by Harvey P. Dale, Mar 14 2015
STATUS
approved