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.

A350701 a(n) is the number of squares strictly between Fibonacci(n) and Fibonacci(n+1).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 3, 4, 5, 7, 8, 11, 14, 18, 22, 29, 36, 46, 58, 75, 95, 120, 154, 195, 248, 315, 402, 511, 649, 826, 1052, 1337, 1700, 2164, 2751, 3501, 4452, 5664, 7204, 9164, 11656, 14828, 18861, 23991, 30518, 38818, 49379, 62810, 79896
Offset: 0

Views

Author

Karl-Heinz Hofmann, Jan 24 2022

Keywords

Comments

Terms a(0..3) are of course 0, because A000045(4) = 3 and A000045(5) = 5 are the first terms which are letting room for at least 1 integer.

Examples

			Strictly between Fibonacci(9) = 34 and Fibonacci(10) = 55 are the 2 squares 36 and 49. So a(9) = 2.
		

Crossrefs

Programs

  • PARI
    a(n)={if(n<=1, 0, sqrtint(fibonacci(n+1)-1) - sqrtint(fibonacci(n)))} \\ Andrew Howroyd, Jan 25 2022
  • Python
    from math import isqrt
    from sympy import fibonacci as fi
    print([0,0] + [(isqrt(fi(k+1)-1) - isqrt(fi(k))) for k in range(2, 55)])
    
  • Python
    from math import isqrt
    from gmpy2 import fib2
    def A350701(n): return 0 if n <= 1 else (lambda x:isqrt(x[0]-1)-isqrt(x[1]))(fib2(n+1)) # Chai Wah Wu, Jan 25 2022