Skip to content

Instantly share code, notes, and snippets.

@brianm
Created February 23, 2026 20:59
Show Gist options
  • Select an option

  • Save brianm/554a5441ca076d02dea2bf8ead32e4be to your computer and use it in GitHub Desktop.

Select an option

Save brianm/554a5441ca076d02dea2bf8ead32e4be to your computer and use it in GitHub Desktop.
import math
def fib(n): return round( (1 / (math.sqrt(5))) * (((1 + math.sqrt(5)) / 2) ** n))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment