|
|
A117648
|
|
Let f(0) = 2, f(1) = 3, and f(n) = (4/3)*f(n-1) - f(n-2) for n >= 2, a(n) = abs(floor(f(n))).
|
|
1
|
|
|
2, 3, 2, 1, 3, 3, 2, 0, 2, 2, 0, 2, 3, 3, 1, 2, 2, 1, 1, 3, 3, 2, 1, 2, 2, 0, 2, 3, 3, 1, 2, 2, 1, 1, 3, 3, 2, 1, 2, 2, 0, 2, 3, 3, 0, 2, 2, 1, 1, 3, 3, 2, 1, 2, 2, 0, 2, 3, 3, 0, 2, 2, 1, 1, 3, 3, 1, 1, 2, 2, 0, 3, 3, 2, 0, 2, 2, 1, 2, 3, 3, 1, 1, 2, 2, 0, 3, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = abs(floor(f(n))), where f(n) = (4/3)*f(n-1) - f(n-2), f(0) = 2, and f(1) = 3.
|
|
MATHEMATICA
|
f[n_]:= f[n]= If[n<2, n+2, (4/3)*f[n-1] -f[n-2]]; a[n_]= Abs[Floor[f[n]]];
Table[a[n], {n, 0, 100}]
|
|
PROG
|
(Magma)
C<i> := ComplexField();
f:= func< n | Round((1/2)*( (2-i*Sqrt(5))*((2+i*Sqrt(5))/3)^n + (2+i*Sqrt(5))*((2-i*Sqrt(5))/3)^n )) >;
(Sage)
@CachedFunction
def f(n): return n+2 if (n<2) else (4/3)*f(n-1) - f(n-2)
def a(n): return abs(floor(f(n)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,less
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|