login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087172 Greatest Fibonacci number that does not exceed n. 6
1, 2, 3, 3, 5, 5, 5, 8, 8, 8, 8, 8, 13, 13, 13, 13, 13, 13, 13, 13, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Also the largest term in Zeckendorf representation of n; starting at Fibonacci positions the sequence is repeated again and again in A107017: A107017(A000045(n)+k)=a(k) with 0<k < A000045(n-1). - Reinhard Zumkeller, May 09 2005

a(n) = A035516(n,0) = A035517(n,A007895(n)-1). - Reinhard Zumkeller, Mar 10 2013

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, Fibonacci Number

FORMULA

a(n) = Fib(A130233(n)) = Fib(A130234(n+1)-1). - Hieronymus Fischer, May 28 2007

a(n) = n - A066628(n). - Michel Marcus, Feb 02 2016

MAPLE

with(combinat):

A087172 := proc (n) local j: for j while fibonacci(j) <= n do fibonacci(j) end do: fibonacci(j-1) end proc:

seq(A087172(n), n = 1 .. 40); # Emeric Deutsch, Nov 11 2014

# Alternative

N:= 100: # to get a(n) for n from 1 to N

Fibs:= [seq(combinat:-fibonacci(i), i = 1 .. ceil(log[(1 + sqrt(5))/2](sqrt(5)*N)))]:

A:= Vector(N):

for i from 1 to nops(Fibs)-1 do

  A[Fibs[i] .. min(N, Fibs[i+1]-1)]:= Fibs[i]

od:

convert(A, list); # Robert Israel, Nov 11 2014

MATHEMATICA

With[{rf=Reverse[Fibonacci[Range[10]]]}, Flatten[Table[ Select[ rf, n>=#&, 1], {n, 80}]]] (* Harvey P. Dale, Dec 08 2012 *)

PROG

(PARI) a(n)=my(k=log(n)\log((1+sqrt(5))/2)); while(fibonacci(k)<=n, k++); fibonacci(k--) \\ Charles R Greathouse IV, Jul 24 2012

(Haskell)

a087172 = head . a035516_row -- Reinhard Zumkeller, Mar 10 2013

CROSSREFS

Cf. A066628, A130233, A130234. Partial sums: A130473.

Sequence in context: A117629 A081165 A289749 * A262457 A286870 A262319

Adjacent sequences:  A087169 A087170 A087171 * A087173 A087174 A087175

KEYWORD

nonn,easy

AUTHOR

Sam Alexander, Oct 19 2003

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 15 07:56 EDT 2019. Contains 328026 sequences. (Running on oeis4.)