login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

G. C. Greubel, Table of n, a(n) for n = 0..1000

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 )) >;

[Abs(Floor(f(n))): n in [0..100]]; // G. C. Greubel, Jul 11 2021

(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)))

[a(n) for n in (0..100)] # G. C. Greubel, Jul 11 2021

CROSSREFS

Sequence in context: A118105 A125211 A139367 * A037222 A107357 A251718

Adjacent sequences:  A117645 A117646 A117647 * A117649 A117650 A117651

KEYWORD

nonn,easy,less

AUTHOR

Roger L. Bagula, Apr 10 2006

EXTENSIONS

Edited by G. C. Greubel, Jul 11 2021

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 15:56 EDT 2022. Contains 353706 sequences. (Running on oeis4.)