```python
from sympy import *
from sympy.abc import x,y,z,a,b,c,f,g,h,P,Q,R,n
```


```python
x = symbols('x')
x
```




$\displaystyle x$




```python
x**2
```




$\displaystyle x^{2}$




```python
fibonacci?
```


    [0;31mInit signature:[0m [0mfibonacci[0m[0;34m([0m[0mn[0m[0;34m,[0m [0msym[0m[0;34m=[0m[0;32mNone[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
    [0;31mDocstring:[0m     
    Fibonacci numbers / Fibonacci polynomials
    
    The Fibonacci numbers are the integer sequence defined by the
    initial terms `F_0 = 0`, `F_1 = 1` and the two-term recurrence
    relation `F_n = F_{n-1} + F_{n-2}`.  This definition
    extended to arbitrary real and complex arguments using
    the formula
    
    .. math :: F_z = \frac{\phi^z - \cos(\pi z) \phi^{-z}}{\sqrt 5}
    
    The Fibonacci polynomials are defined by `F_1(x) = 1`,
    `F_2(x) = x`, and `F_n(x) = x*F_{n-1}(x) + F_{n-2}(x)` for `n > 2`.
    For all positive integers `n`, `F_n(1) = F_n`.
    
    * ``fibonacci(n)`` gives the `n^{th}` Fibonacci number, `F_n`
    * ``fibonacci(n, x)`` gives the `n^{th}` Fibonacci polynomial in `x`, `F_n(x)`
    
    Examples
    ========
    
    >>> from sympy import fibonacci, Symbol
    
    >>> [fibonacci(x) for x in range(11)]
    [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
    >>> fibonacci(5, Symbol('t'))
    t**4 + 3*t**2 + 1
    
    See Also
    ========
    
    bell, bernoulli, catalan, euler, harmonic, lucas, genocchi, partition, tribonacci
    
    References
    ==========
    
    .. [1] https://en.wikipedia.org/wiki/Fibonacci_number
    .. [2] http://mathworld.wolfram.com/FibonacciNumber.html
    [0;31mFile:[0m           ~/.local/lib/python3.8/site-packages/sympy/functions/combinatorial/numbers.py
    [0;31mType:[0m           FunctionClass
    [0;31mSubclasses:[0m     




```python
for i in range(1,4):
    #print("Value of n = {}".format(i))
   
# Use sympy.fibonacci() method 
    nth_fibonacci = fibonacci(i)  
      
    print("Value of n fibonacci number : {}".format(nth_fibonacci)) 
```

    Value of n fibonacci number : 1
    Value of n fibonacci number : 1
    Value of n fibonacci number : 2



```python
for i in range(0,5):
    print(2**i)
    
```

    1
    2
    4
    8
    16



```python
f = factorial(x)/(factorial(y)*factorial(x-y))
f
```




$\displaystyle \frac{x!}{y! \left(x - y\right)!}$




```python
f.subs(x,pi-y).subs(y,pi).evalf()
```




$\displaystyle -0.0435986286291878$




```python
fibonacci(5)
```




$\displaystyle 5$




```python
[fibonacci(x) for x in range(11)]
```




    [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]




```python
fibonacci(n, Symbol('t'))
```




$\displaystyle F_{n}\left(t\right)$




```python
fibonacci(3, Symbol('t'))
```




$\displaystyle t^{2} + 1$




```python
list = []
for x in range(1,20):
    list.append(fibonacci(x, Symbol('x')))
list    
```




    [1,
     x,
     x**2 + 1,
     x**3 + 2*x,
     x**4 + 3*x**2 + 1,
     x**5 + 4*x**3 + 3*x,
     x**6 + 5*x**4 + 6*x**2 + 1,
     x**7 + 6*x**5 + 10*x**3 + 4*x,
     x**8 + 7*x**6 + 15*x**4 + 10*x**2 + 1,
     x**9 + 8*x**7 + 21*x**5 + 20*x**3 + 5*x,
     x**10 + 9*x**8 + 28*x**6 + 35*x**4 + 15*x**2 + 1,
     x**11 + 10*x**9 + 36*x**7 + 56*x**5 + 35*x**3 + 6*x,
     x**12 + 11*x**10 + 45*x**8 + 84*x**6 + 70*x**4 + 21*x**2 + 1,
     x**13 + 12*x**11 + 55*x**9 + 120*x**7 + 126*x**5 + 56*x**3 + 7*x,
     x**14 + 13*x**12 + 66*x**10 + 165*x**8 + 210*x**6 + 126*x**4 + 28*x**2 + 1,
     x**15 + 14*x**13 + 78*x**11 + 220*x**9 + 330*x**7 + 252*x**5 + 84*x**3 + 8*x,
     x**16 + 15*x**14 + 91*x**12 + 286*x**10 + 495*x**8 + 462*x**6 + 210*x**4 + 36*x**2 + 1,
     x**17 + 16*x**15 + 105*x**13 + 364*x**11 + 715*x**9 + 792*x**7 + 462*x**5 + 120*x**3 + 9*x,
     x**18 + 17*x**16 + 120*x**14 + 455*x**12 + 1001*x**10 + 1287*x**8 + 924*x**6 + 330*x**4 + 45*x**2 + 1]




```python
list[1]   
```




$\displaystyle x$




```python
list[2]   
```




$\displaystyle x^{2} + 1$




```python
list[3]   
```




$\displaystyle x^{3} + 2 x$




```python
list[4]   
```




$\displaystyle x^{4} + 3 x^{2} + 1$




```python
list[5] 
```




$\displaystyle x^{5} + 4 x^{3} + 3 x$




```python
list[6]
```




$\displaystyle x^{6} + 5 x^{4} + 6 x^{2} + 1$




```python
q = list[0]+list[1]
w = list[1] + list[2]
e = list[2]+list[3]
r = list[3]+list[4]  
u = list[4]+list[5] 
```


```python
plot(q,w,e,r,u,yscale='log')
```


```python
plot(log(q),log(w),log(e),log(r),log(u))
```


```python
log(q)
```




$\displaystyle \log{\left(x + 1 \right)}$




```python
log(w)
```




$\displaystyle \log{\left(x^{2} + x + 1 \right)}$




```python
log(e)
```




$\displaystyle \log{\left(x^{3} + x^{2} + 2 x + 1 \right)}$




```python
log(r)
```




$\displaystyle \log{\left(x^{4} + x^{3} + 3 x^{2} + 2 x + 1 \right)}$




```python
log(u)
```




$\displaystyle \log{\left(x^{5} + x^{4} + 4 x^{3} + 3 x^{2} + 3 x + 1 \right)}$




```python
list[0]
```




$\displaystyle 1$




```python
list[1]
```




$\displaystyle x$




```python
q
```




$\displaystyle x + 1$




```python
w
```




$\displaystyle x^{2} + x + 1$




```python
x = symbols('x')
fibonacci(1, Symbol('x'))
```




$\displaystyle 1$




```python
fibonacci(2, Symbol('x'))
```




$\displaystyle x$




```python
fibonacci(1, Symbol('x'))+fibonacci(2, Symbol('x'))
```




$\displaystyle x + 1$




```python
fibonacci(2, Symbol('x'))+fibonacci(3, Symbol('x'))
```




$\displaystyle x^{2} + x + 1$




```python
list2 = []
for i in range(1,14):
    list2.append(fibonacci(i, Symbol('x'))+fibonacci(i+1, Symbol('x')))
list2       
```




    [x + 1,
     x**2 + x + 1,
     x**3 + x**2 + 2*x + 1,
     x**4 + x**3 + 3*x**2 + 2*x + 1,
     x**5 + x**4 + 4*x**3 + 3*x**2 + 3*x + 1,
     x**6 + x**5 + 5*x**4 + 4*x**3 + 6*x**2 + 3*x + 1,
     x**7 + x**6 + 6*x**5 + 5*x**4 + 10*x**3 + 6*x**2 + 4*x + 1,
     x**8 + x**7 + 7*x**6 + 6*x**5 + 15*x**4 + 10*x**3 + 10*x**2 + 4*x + 1,
     x**9 + x**8 + 8*x**7 + 7*x**6 + 21*x**5 + 15*x**4 + 20*x**3 + 10*x**2 + 5*x + 1,
     x**10 + x**9 + 9*x**8 + 8*x**7 + 28*x**6 + 21*x**5 + 35*x**4 + 20*x**3 + 15*x**2 + 5*x + 1,
     x**11 + x**10 + 10*x**9 + 9*x**8 + 36*x**7 + 28*x**6 + 56*x**5 + 35*x**4 + 35*x**3 + 15*x**2 + 6*x + 1,
     x**12 + x**11 + 11*x**10 + 10*x**9 + 45*x**8 + 36*x**7 + 84*x**6 + 56*x**5 + 70*x**4 + 35*x**3 + 21*x**2 + 6*x + 1,
     x**13 + x**12 + 12*x**11 + 11*x**10 + 55*x**9 + 45*x**8 + 120*x**7 + 84*x**6 + 126*x**5 + 70*x**4 + 56*x**3 + 21*x**2 + 7*x + 1]




```python
list3 = []
for i in range(1,14):
    list3.append(fibonacci(i+1, Symbol('x'))+fibonacci(i+2, Symbol('x')))
list3   
```




    [x**2 + x + 1,
     x**3 + x**2 + 2*x + 1,
     x**4 + x**3 + 3*x**2 + 2*x + 1,
     x**5 + x**4 + 4*x**3 + 3*x**2 + 3*x + 1,
     x**6 + x**5 + 5*x**4 + 4*x**3 + 6*x**2 + 3*x + 1,
     x**7 + x**6 + 6*x**5 + 5*x**4 + 10*x**3 + 6*x**2 + 4*x + 1,
     x**8 + x**7 + 7*x**6 + 6*x**5 + 15*x**4 + 10*x**3 + 10*x**2 + 4*x + 1,
     x**9 + x**8 + 8*x**7 + 7*x**6 + 21*x**5 + 15*x**4 + 20*x**3 + 10*x**2 + 5*x + 1,
     x**10 + x**9 + 9*x**8 + 8*x**7 + 28*x**6 + 21*x**5 + 35*x**4 + 20*x**3 + 15*x**2 + 5*x + 1,
     x**11 + x**10 + 10*x**9 + 9*x**8 + 36*x**7 + 28*x**6 + 56*x**5 + 35*x**4 + 35*x**3 + 15*x**2 + 6*x + 1,
     x**12 + x**11 + 11*x**10 + 10*x**9 + 45*x**8 + 36*x**7 + 84*x**6 + 56*x**5 + 70*x**4 + 35*x**3 + 21*x**2 + 6*x + 1,
     x**13 + x**12 + 12*x**11 + 11*x**10 + 55*x**9 + 45*x**8 + 120*x**7 + 84*x**6 + 126*x**5 + 70*x**4 + 56*x**3 + 21*x**2 + 7*x + 1,
     x**14 + x**13 + 13*x**12 + 12*x**11 + 66*x**10 + 55*x**9 + 165*x**8 + 120*x**7 + 210*x**6 + 126*x**5 + 126*x**4 + 56*x**3 + 28*x**2 + 7*x + 1]




```python
list2[0]
```




$\displaystyle x + 1$




```python
list3[0]
```




$\displaystyle x^{2} + x + 1$




```python
list4 = []
for i in range(0,10):

    list4.append(list2[i]+list3[i])
list4
```




    [x**2 + 2*x + 2,
     x**3 + 2*x**2 + 3*x + 2,
     x**4 + 2*x**3 + 4*x**2 + 4*x + 2,
     x**5 + 2*x**4 + 5*x**3 + 6*x**2 + 5*x + 2,
     x**6 + 2*x**5 + 6*x**4 + 8*x**3 + 9*x**2 + 6*x + 2,
     x**7 + 2*x**6 + 7*x**5 + 10*x**4 + 14*x**3 + 12*x**2 + 7*x + 2,
     x**8 + 2*x**7 + 8*x**6 + 12*x**5 + 20*x**4 + 20*x**3 + 16*x**2 + 8*x + 2,
     x**9 + 2*x**8 + 9*x**7 + 14*x**6 + 27*x**5 + 30*x**4 + 30*x**3 + 20*x**2 + 9*x + 2,
     x**10 + 2*x**9 + 10*x**8 + 16*x**7 + 35*x**6 + 42*x**5 + 50*x**4 + 40*x**3 + 25*x**2 + 10*x + 2,
     x**11 + 2*x**10 + 11*x**9 + 18*x**8 + 44*x**7 + 56*x**6 + 77*x**5 + 70*x**4 + 55*x**3 + 30*x**2 + 11*x + 2]




```python
list4[0]
```




$\displaystyle x^{2} + 2 x + 2$




```python
list4[1]
```




$\displaystyle x^{3} + 2 x^{2} + 3 x + 2$




```python
list4[2]
```




$\displaystyle x^{4} + 2 x^{3} + 4 x^{2} + 4 x + 2$




```python

```

dffe6201ea5e24f3277c8f9d15bdf06c6b838c1b
ipynb
Jupyter Notebook
Personal_Projects/Fibonaccis.ipynb
NSC9/Sample_of_Work
8f8160fbf0aa4fd514d4a5046668a194997aade6
MIT
Personal_Projects/Fibonaccis.ipynb
NSC9/Sample_of_Work
8f8160fbf0aa4fd514d4a5046668a194997aade6
MIT
Personal_Projects/Fibonaccis.ipynb
NSC9/Sample_of_Work
8f8160fbf0aa4fd514d4a5046668a194997aade6
MIT
Qwen/Qwen-72B
1. YES
2. YES