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-2 of 2 results.

A190993 Square excess of Fibonacci numbers.

Original entry on oeis.org

0, 0, 0, 1, 2, 1, 4, 4, 5, 9, 6, 8, 0, 8, 16, 34, 26, 76, 84, 85, 41, 130, 22, 96, 143, 496, 289, 169, 842, 140, 296, 669, 2684, 1449, 343, 4096, 7583, 592, 665, 11682, 699, 20452, 2872, 22037, 6477, 21826, 17999, 93009, 46080, 31240, 121681, 8638, 317523
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [Fibonacci(n) - Floor(Sqrt(Fibonacci(n)))^2: n in [0..100]]; // G. C. Greubel, Oct 26 2022
    
  • Maple
    a:= n-> (f-> f-floor(sqrt(f))^2)((<<0|1>, <1|1>>^n)[1, 2]):
    seq(a(n), n=0..52);  # Alois P. Heinz, Oct 26 2022
  • Mathematica
    A000045=Fibonacci[Range[0,100]]; Table[A000045[[n]]-Floor[Sqrt[A000045[[n]]]]^2,{n,Length[A000045]}]
  • PARI
    a(n) = my(f=fibonacci(n)); f - sqrtint(f)^2; \\ Michel Marcus, Nov 11 2015
    
  • SageMath
    [fibonacci(n) - isqrt(fibonacci(n))^2 for n in range(101)] # G. C. Greubel, Oct 26 2022

Extensions

a(0) prepended by Alois P. Heinz, Nov 11 2015

A243256 Smallest distance of the n-th Fibonacci number to the set of all square integers.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 3, 4, 2, 6, 8, 0, 8, 16, 15, 26, 3, 17, 44, 41, 79, 22, 96, 143, 51, 289, 169, 285, 140, 296, 669, 267, 1449, 343, 1979, 144, 592, 665, 4223, 699, 5283, 2872, 19604, 6477, 21826, 17999, 16008, 46080, 31240, 102696, 8638, 45526, 95764
Offset: 0

Views

Author

Ralf Stephan, Jun 02 2014

Keywords

Comments

a(n) = 0 if and only if n = 0, 1, 2, 12.
The sorted unique members: 0, 1, 2, 3, 4, 6, 8, 15, 16, 17, 22, 26 ...

Programs

  • PARI
    {a(n) = my(f, i); if( n<0, 0, i = sqrtint( f = fibonacci(n))); min(f - i^2, (i+1)^2 - f)}; /* Michael Somos, Jun 02 2014 */
  • Sage
    def a(n):
        f = fibonacci(n)
        return min((floor(sqrt(f))+1)^2 - f, f - floor(sqrt(f))^2)
    

Formula

a(n) = min(A190993(n), A216223(n)).
Showing 1-2 of 2 results.