cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A087172 Greatest Fibonacci number that does not exceed n.

Original entry on oeis.org

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
Offset: 1

Views

Author

Sam Alexander, Oct 19 2003

Keywords

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
Fibonacci(n) occurs Fibonacci(n-1) times, for n >= 2. - Benoit Cloitre, Dec 15 2022

Crossrefs

Programs

  • Haskell
    a087172 = head . a035516_row -- Reinhard Zumkeller, Mar 10 2013
  • 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 *)
    Flatten[Map[ConstantArray[Fibonacci[#],Fibonacci[#-1]]&,Range[15]]] (* Peter J. C. Moses, May 02 2022 *)
  • 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
    

Formula

a(n) = Fibonacci(A130233(n)) = Fibonacci(A130234(n+1)-1). - Hieronymus Fischer, May 28 2007
a(n) = A035516(n, 0) = A035517(n, A007895(n)-1). - Reinhard Zumkeller, Mar 10 2013
a(n) = n - A066628(n). - Michel Marcus, Feb 02 2016
Sum_{n>=1} 1/a(n)^2 = Sum_{n>=1} Fibonacci(n)/Fibonacci(n+1)^2 = 1.7947486789... . - Amiram Eldar, Aug 16 2022

A333907 For n >= 1, a(n) = Sum_{k=1..n} prevfib(k) + nextfib(k) - 2*k, where prevfib(k) is the largest Fibonacci number < k, nextfib(k) is the smallest Fibonacci number > k.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 2, 4, 7, 8, 7, 4, 7, 13, 17, 19, 19, 17, 13, 7, 12, 23, 32, 39, 44, 47, 48, 47, 44, 39, 32, 23, 12, 20, 39, 56, 71, 84, 95, 104, 111, 116, 119, 120, 119, 116, 111, 104, 95, 84, 71, 56, 39, 20, 33, 65, 95, 123, 149, 173, 195, 215, 233, 249, 263, 275
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 09 2020

Keywords

Examples

			a(1) = (0 + 2 - 2*1) = 0;
a(2) = (0 + 2 - 2*1) + (1 + 3 - 2*2) = 0;
a(3) = (0 + 2 - 2*1) + (1 + 3 - 2*2) + (2 + 5 - 2*3) = 1;
a(4) = (0 + 2 - 2*1) + (1 + 3 - 2*2) + (2 + 5 - 2*3) + (3 + 5 - 2*4) = 1.
		

Crossrefs

Programs

  • PARI
    isfib(k) = my(m=5*k^2); issquare(m-4) || issquare(m+4);
    nextfib(n) = my(k=n+1); while (!isfib(k), k++); k;
    prevfib(n) = my(k=n-1); while (!isfib(k), k--); k;
    a(n) = sum(k=1, n, prevfib(k) + nextfib(k) - 2*k); \\ Michel Marcus, Apr 10 2020

A351628 Partial sums of A352717.

Original entry on oeis.org

1, 2, 5, 9, 13, 17, 24, 31, 38, 45, 56, 67, 78, 89, 100, 111, 122, 140, 158, 176, 194, 212, 230, 248, 266, 284, 302, 320, 349, 378, 407, 436, 465, 494, 523, 552, 581, 610, 639, 668, 697, 726, 755, 784, 813, 842, 889, 936, 983, 1030, 1077, 1124, 1171, 1218
Offset: 1

Views

Author

Clark Kimberling, May 04 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Flatten[Map[ConstantArray[LucasL[#],LucasL[#-1]]&,Range[15]]]] (* Peter J. C. Moses, May 02 2022 *)
  • Python
    from itertools import islice
    def A351628_gen(): # generator of terms
        a, b, c = 1, 3, 0
        while True:
            yield from (c+i*a for i in range(1,b-a+1))
            a, b, c = b, a+b, c + a*(b-a)
    A351628_list = list(islice(A351628_gen(),40)) # Chai Wah Wu, Jun 09 2022
Showing 1-3 of 3 results.