nt.number theory – Sum of Fibonacci sequence evaluated at a Dirichler character

Let $F_n$ be the Fibonacci sequence and $chi$ a non-principal primitive Dirichlet character. Does there exist $n$ such that $chi(F_n) neq 0,1$?

One way to prove this would be to obtain non-trivial bounds for sums of the shape $sum_{n leq x} chi(F_n)$.

It is foreseeable that there could be some “bad” Dirichlet characters where one does not obtain the result, so I’m very happy to ignore finitely many Dirichlet characters of any given order (say).

More generally, I’d like to know a version of this where $F_n$ is replaced by an arbitrary Lucas sequence.

combinatorics – A question involving the permutations of 1,2,…, n and the fibonacci sequence (Kazakstan-2015)

If $nge 4$. Find the amount of permutations $x_1,…,x_n$ of $1,2,…,n$ such that $x_ile x_{i+2}$ for every $1le ile n-2$ and $x_ile x_{i+3}$ for every $1le i le n-3$.

I have written done this questions taking the case of n=1, 2 etc. and have concluded that the result matched that of the Fibonaccia sequence, in other words that $a_n=a_{n-1}+a_{n-2}$ where $a_i$ is the answer for given $n$. However I can not prove it. Could you please explain to me how to prove it and how to think of each step of the solution?

c++ – Theoretical Analysis of Fibonacci series

Hello i am starting to learn c++. I am having trouble with time and complexity analysis. I have done fibonacci series in a recursive way. I think it is O(n^2). Can you find out the time analysis ? If possible, could you elaborate it?

#include<iostream>
using namespace std;

void fibonacci(int n,int n1,int n2)
{
    if(n==0)
    {
        cout<<endl<<n1;
        return;
    }
    else if(n==1)
    {
        cout<<endl<<n2;
        return;
    }
    fibonacci(n-1,n2,n1+n2);
    return;
}

int main()
{
    int n;
    cout<<"Enter the number:"<<endl;
    cin>>n;
    fibonacci(n,0,1);
    return 0;
}

How to find a Sum of N terms of Fibonacci?

As we know Fibonacci is represented by this recurrence relation.
$$ F[n]= F[n-1] + F[n-2] $$
How to find a general expression for $ S[n] $ where the Series $ S $ represents the sum of Fibonnaci Till N terms,
How to find a generalized formulae for $ S[n] $ , As this problem is a pretty standard Coding Problem and Math Stack exchange had no question discussing this I picked this up to show it how to derive an expression of it .

procedural generation – UV unwrap a fibonacci spiral sphere?

I’m working on a little planet simulator project, and I wanted to use a Fibonacci spiral sphere to generate the planet mesh. I like that it isn’t a square grid and somewhat organic, but I’m having trouble UV-mapping the procedural mesh. I not only have a jagged looking tear in the texture, but it also stretches the texture in a strange way, as shown in the picture below. I’d really like to generate textures for use later on, so I want to try to fix this now.

Left: the procedural sphere | Right: Unity default sphere

My code uses this library (using GK;) to triangulate the sphere’s mesh. I’ve included the entire code that generates the Fibonacci Spiral Sphere below and the Sphere script below that.

I start by using the updatePoints() function to generate the vertices of the Fibonacci Spiral Sphere. It calls the Fibonacci_Spiral_Sphere() function in the FibonacciPoints3D script, which generates the vertices and triangles for the mesh. I also add the final vertex and the triangles needed to close the sphere at the bottom using stitchMesh().

As you can see in the Fibonacci script, I’ve tried a few different projections to try to find a UV that works. The Stereographic projection is used for triangle calculation but isn’t useful for UV projection. I’ve tried Mercator and icosphere projections, but neither has given good results.

I think I can fix the jagged line and weird poles by following this example. My question is this: Are there any resources about procedurally UV unwrapping a Fibonacci spiral sphere? Or should I just give up and go back to Isospheres?

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using UnityEngine;
using GK;

namespace FP
{
    public class FibonacciPoints3D
    {
        private static float gr = (Mathf.Sqrt(5) + 1) / 2; // golden ratio = 1.6180339887
        private static float ga = (2f - gr) * (2f * Mathf.PI); // golden angle = 2.3999632297
        
        private DelaunayCalculator Dc;
        public DelaunayTriangulation Dt;
        
        public List<Vector3> Points3D;
        public List<Vector2> Points2D;
        public List<Vector3> PointsM;

        public float GoldenRatio { get { return gr; } }
        public float GoldenAngle { get { return ga; } }
        //public List<Vector3> Points3D {get { return Points3D; } }
        
        public FibonacciPoints3D()
        {
            Points3D = new List<Vector3>();
            Points2D = new List<Vector2>();
            PointsM = new List<Vector3>();
            
            
            Dc = new DelaunayCalculator();
            Dt = null;
        }

        public List<Vector3> Fibonacci_Spiral_Sphere(int num_Points3D, float r)
        {
            List<Vector3> positions = new List<Vector3>();
            for (int i = 0; i < num_Points3D; i++)
            {
                float lat = Mathf.Asin((float)-1.0 + (float)2.0 * (float)i / (num_Points3D + 1));
                float lon = ga * (float)i;

                float x = Mathf.Cos(lon) * Mathf.Cos(lat);
                float y = Mathf.Sin(lon) * Mathf.Cos(lat);
                float z = Mathf.Sin(lat);
                
                Vector3 pos = (new Vector3(x, y, z) * r);

                positions.Add(RotateX_90(pos));
            }
            
            Points3D = positions;
            Stereograph_Project_Sphere(r);
            
            Dt = Dc.CalculateTriangulation(Points2D);
            
            return positions;
        }
        
        private Vector3 RotateX_90(Vector3 vec)
        {
            float x = 1*vec.x;
            float y = -1*vec.z;
            float z = 1*vec.y;
            
            return new Vector3(x,y,z);
        }
        
        public List<Vector2> Stereograph_Project_Sphere(float radius)
        {
            List<Vector2> positions = new List<Vector2>();
            for (int i = 0; i < Points3D.Count; i++)
            {
                positions.Add(Stereograph_Projection(Points3D(i), radius));
            }
            
            Points2D = positions;
            return positions;
        }

        public Vector2 Stereograph_Projection(Vector3 point3, float radius)
        {
            float x = point3.x / (point3.y + radius);
            float y = point3.z / (point3.y + radius);

            return new Vector2(y, x);
        }

        public Vector3 Reverse_Stereograph_Projection(Vector2 point2)
        {
            float x = (2 * point2.x) / (1f + Mathf.Pow(point2.x, 2) + Mathf.Pow(point2.y, 2));
            float y = (2 * point2.y) / (1f + Mathf.Pow(point2.x, 2) + Mathf.Pow(point2.y, 2));
            float z = (-1f + Mathf.Pow(point2.x, 2) + Mathf.Pow(point2.y, 2)) / 
                (1f + (1 * Mathf.Pow(point2.x, 2)) + (1 * Mathf.Pow(point2.y, 2)));

            return new Vector3(x, y, z);
        }
        
        public List<Vector3> Mercator_Project_Sphere(Vector3 PrimeMeridian, float radius, Vector2 scale)
        {
            List<Vector3> positions = new List<Vector3>();
            float yMin = 0;
            float yMax = 0;
            float xMin = 0;
            float xMax = 0;

            for(int i = 0; i < Points3D.Count; i++)
            {
                positions.Add(Mercator_Projection(Points3D(i), PrimeMeridian, radius));

                if(positions(i).y < yMin) yMin = positions(i).y;
                if(positions(i).y > yMax) yMax = positions(i).y;
                if(positions(i).x < xMin) xMin = positions(i).x;
                if(positions(i).x > xMax) xMax = positions(i).x;
            }

            //UnityEngine.Debug.Log("y " + yMin + ":" + yMax + " | " + xMin + ":" + xMax);

            positions(0) = new Vector3(0f * scale.x, 1f * scale.y, 0);
            for(int i = 1; i < Points3D.Count; i++)
            {
                float x = ((positions(i).x + xMin) / (xMax - xMin)) * scale.x;
                float y = ((positions(i).y - yMin) / (yMax - yMin)) * scale.y;

                positions(i) = new Vector3(x, y, 0);
            }
            
            PointsM = positions;
            return positions;
        }
        
        public Vector3 Mercator_Projection(Vector3 point3, Vector3 PrimeMeridian, float radius)
        {
            ///This Mercator Projection uses the provided Prime Meridian (i.e. the 
            ///transform.right of the parent object.
            
            float PM = Mathf.Atan2(PrimeMeridian.z, PrimeMeridian.x);
            
            float lat = Mathf.Asin(point3.y / radius);
            float lon = Mathf.Atan2(point3.z, point3.x);
            
            //Debug.Log(point3 + " | " + lat + " " + lon);
            
            float x = lon - PM;
            float y = Mathf.Log(Mathf.Tan(lat) + 1/Mathf.Cos(lat));
            
            return new Vector3(x, y, 0);
        }

        public List<Vector2> UV_Project_Sphere()
        {
            List<Vector2> positions = new List<Vector2>();

            for(int i = 0; i < Points3D.Count; i++)
            {
                positions.Add(UV_Projection(Points3D(i)));
            }

            return positions;
        }

        public Vector2 UV_Projection(Vector3 point3)
        {
            float u = 0.5f + ((Mathf.Atan2(point3.z, point3.x)) / 2 * Mathf.PI);
            float v = 0.5f - ((Mathf.Asin(point3.y)) / Mathf.PI);

            return new Vector2(u, v);
        }
    }
}

Below is the Sphere code.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Collections.Specialized;
using System;
using UnityEditor;
using System.Diagnostics;
using FP;
using WV;
using System.Security.Cryptography;
using System.Runtime.InteropServices;

(RequireComponent(typeof(MeshFilter)))
public class Sphere : MonoBehaviour
{ 
    public bool MapProjection = true;
    public int numberOfPoints = 10;
    private int m_numberOfPoints = 10;
    public float pointsRadius = 1;
    private float m_pointsRadius = 1;

    private FibonacciPoints3D Fp;
    public WeatherVoxels Wv;
    
    (HideInInspector)
    public Vector3() vertices;
    (HideInInspector)
    public int() triangles;
    private Mesh mesh;
    
    public Transform Map;
    public Vector2 scale;
    
    public int select = 0;

    // Start is called before the first frame update
    void Start()
    {
        Fp = new FibonacciPoints3D();
        
        vertices = new Vector3(numberOfPoints);
        triangles = new int(numberOfPoints*3);
        mesh = new Mesh();
        GetComponent<MeshFilter>().mesh = mesh;
        mesh.name = "Planet";
        
        updatePoints(numberOfPoints, pointsRadius);
        
        stitchMesh(ref triangles, ref vertices);
        
        makeMesh(triangles, vertices);

        Wv = new WeatherVoxels(vertices, triangles);
    }

    // Update is called once per frame
    void Update()
    {
        if (numberOfPoints != m_numberOfPoints || pointsRadius != m_pointsRadius)
        {
            updatePoints(numberOfPoints, pointsRadius);
            //UnityEngine.Debug.Log("Points Changed");
            
            stitchMesh(ref triangles, ref vertices);
            
            makeMesh(triangles, vertices);

            Wv = new WeatherVoxels(vertices, triangles);
        }
    }

    void updatePoints(int numPoints, float radius)
    {
        if (numPoints < 50)
        {
            numPoints = 50;
        }
        if(radius <= 0.01f)
        {
            radius = 0.01f;
        }
        m_numberOfPoints = numPoints;
        m_pointsRadius = radius;
        
        Fp.Fibonacci_Spiral_Sphere(numPoints, radius);
        Fp.Mercator_Project_Sphere(transform.right, radius, scale);
        
        vertices = Fp.Points3D.ToArray();
        triangles = Fp.Dt.Triangles.ToArray();
    }
    
    void makeMesh(int() tris, Vector3() verts)
    {
        mesh.Clear();
        mesh.vertices = verts;
        mesh.triangles = tris;
        mesh.RecalculateNormals();

        List<Vector2> Mm = Fp.UV_Project_Sphere();
        Vector2() M = new Vector2(verts.Length);
        for(int i = 0; i < Mm.Count - 1; i++)
        {
            M(i) = Mm(i);
        }
        M(vertices.Length - 1) = new Vector2(
            0.5f + ((Mathf.Atan2(vertices(vertices.Length - 1).z, vertices(vertices.Length - 1).x)) / (2 * Mathf.PI)), 
            0.5f - ((Mathf.Asin(vertices(vertices.Length - 1).y))/ (Mathf.PI))
            );
        mesh.uv = M;
    }
    
    
    void stitchMesh(ref int() tris, ref Vector3() verts)
    {
        //UnityEngine.Debug.Log("Before " + vertices.Length);
        
        Vector3 sPole = new Vector3(0,
            0 - pointsRadius, 0);
        
        Vector3() newVerts = new Vector3(verts.Length + 1);
        for(int i = 0; i < verts.Length; i++)
        {
            newVerts(i) = verts(i);
        }
        newVerts(newVerts.Length-1) = sPole;
        verts = newVerts;
        
        //UnityEngine.Debug.Log("After " + vertices.Length);
        
        int() newTris = new int(tris.Length + 15);
        for(int i = 0; i < tris.Length; i++)
        {
            newTris(i) = tris(i);
        }
        
        newTris(tris.Length) = verts.Length-2;
        newTris(tris.Length + 1) = verts.Length-4;
        newTris(tris.Length + 2) = verts.Length-1;
        
        newTris(tris.Length + 3) = verts.Length-4;
        newTris(tris.Length + 4) = verts.Length-6;
        newTris(tris.Length + 5) = verts.Length-1;
        
        newTris(tris.Length + 6) = verts.Length-6;
        newTris(tris.Length + 7) = verts.Length-3;
        newTris(tris.Length + 8) = verts.Length-1;
        
        newTris(tris.Length + 9) = verts.Length-3;
        newTris(tris.Length + 10) = verts.Length-5;
        newTris(tris.Length + 11) = verts.Length-1;
        
        newTris(tris.Length + 12) = verts.Length-5;
        newTris(tris.Length + 13) = verts.Length-2;
        newTris(tris.Length + 14) = verts.Length-1;
        
        tris = newTris;
    }

    public List<Vector3> GetAdjascentPositions(int index, Vector3() verts, int() triangles)
    {
        List<int> tris = new List<int>();
        List<Vector3> result = new List<Vector3>();
        
        for (int j = 0; j < triangles.Length; j++)
        {
            if (triangles(j) == Mathf.FloorToInt(index))
            {
                switch (j % 3)
                {
                    case (0):
                        if (!tris.Contains(triangles(j))) { tris.Add(triangles(j)); }
                        if (!tris.Contains(triangles(j + 1))) { tris.Add(triangles(j + 1)); }
                        if (!tris.Contains(triangles(j + 2))) { tris.Add(triangles(j + 2)); }
                        break;
                    case (1):
                        if (!tris.Contains(triangles(j - 1))) { tris.Add(triangles(j - 1)); }
                        if (!tris.Contains(triangles(j))) { tris.Add(triangles(j)); }
                        if (!tris.Contains(triangles(j + 1))) { tris.Add(triangles(j + 1)); }
                        break;
                    case (2):
                        if (!tris.Contains(triangles(j - 2))) { tris.Add(triangles(j - 2)); }
                        if (!tris.Contains(triangles(j - 1))) { tris.Add(triangles(j - 1)); }
                        if (!tris.Contains(triangles(j))) { tris.Add(triangles(j)); }
                        break;
                    default:
                        UnityEngine.Debug.LogError("wierd stuff happened while looking through triangles array.");
                        break;
                }
            }
        }
        foreach (int point in tris)
        {
            result.Add(transform.TransformPoint(verts(point)));
        }

        return result;
    }


    void OnDrawGizmos()
    {
        if(Fp != null){
            for(int i=0; i<vertices.Length; i++)
            {
                if((i == select))
                {
                    Gizmos.color = Color.white;

                    for(int j = 0; j < Wv.voxels(select).neighbors.Count; j++)
                    {
                        Gizmos.DrawWireSphere(transform.TransformPoint(Wv.voxels(select).neighbors(j).position)
                            , 0.02f);
                    }
                }
                else if(i > Fp.Points3D.Count - 6 && i < vertices.Length - 1)
                {
                    Gizmos.color = Color.red;
                }
                else if(i == vertices.Length - 1)
                {
                    Gizmos.color = Color.cyan;
                }
                else
                {
                    Gizmos.color = Color.Lerp(Color.green, Color.blue, 
                        ((float)i / (float)Fp.Points3D.Count));
                }
                
                Gizmos.DrawSphere(transform.TransformPoint(
                    vertices(i)), 0.01f);
                if(i < vertices.Length - 1)
                {
                    if (MapProjection)
                    {
                        Gizmos.DrawSphere(Map.transform.position + new Vector3(
                                            Fp.PointsM(i).x, Fp.PointsM(i).y, 0), 0.05f);
                    }
                    else
                    {
                        Gizmos.DrawSphere(Map.transform.position + new Vector3(
                                            Fp.Points2D(i).x, Fp.Points2D(i).y, 0), 0.05f);
                    }
                }
            }
            if (MapProjection)
            {
                Gizmos.DrawSphere(Map.transform.position + new Vector3(0, 0, 0), 0.05f);
            }
        }
    }
}

modular arithmetic – How to program last digits of Fibonacci numbers?

Is there a way to compute the last digits of an arbitrarily large Fibonacci number? For the $10^n$th Fibonacci number we can just find the $2^n$th Fibonacci number (if that isn’t too large) mod n, and then use the Chinese remainder theorem since we know it is a multiple of $5^n$ (the Pisano period is $4*5^n$ which divides $10^n$) to find the last n digits.

However, is there a way to find the last digits of $Fib_n$ efficiently if n is not a power of 10? A way to program this would probably require a way to reference the last two intermediate values and add them together, and then taking the result mod $10^d$. Taking the value mod $3times10^d$ would be preferred because this allows the calculation to be iterated.

algorithms – Intuition behind the entire concept of Fibonacci Heap operations

The following excerpts are from the section Fibonacci Heap from the text Introduction to Algorithms by Cormen et. al


The potential function for the Fibonacci Heaps $H$is defined as follows:

$$Phi(H)=t(H)+2m(H)$$

where $t(H)$ is the number of trees in the root list of the heap $H$ and $m(H)$ is the number of marked nodes in the heap.

Before diving into the Fibonacci Heap operations the authors try to convince us about the essence of Fibonacci Heaps as follows:

The key idea in the mergeable-heap operations on Fibonacci heaps is to delay work as long as possible. There is a performance trade-off among implementations of the various operations.($color{green}{text{I do not get why}}$) If the number of trees in a Fibonacci heap is small, then during an $text{Extract-Min}$ operation we can quickly determine which of the remaining nodes becomes the new minimum node( $color{blue}{text{why?}}$ ). However, as we saw with binomial heaps, we pay a price for ensuring that the number of trees is small: it can take up to $Omega (lg n)$ time to insert a node into a binomial heap or to unite two binomial heaps. As we shall see, we do not attempt to consolidate trees in a Fibonacci heap when we insert a new node or unite two heaps. We save the consolidation for the $text{Extract-Min}$ operation, which is when we really need to find the new minimum node.


Now the problem which I am facing with the text is that they dive into proving the amortized cost mathematically using the potential method without going into the vivid intuition of the how or when the “credits” are stored as potential in the heap data structure and when it is actually used up. Moreover in most of the places what is used is “asymptotic” analysis instead of actual mathematical calculations, so it is not quite possible to conjecture whether the constant in $O(1)$ for the amortized cost ( $widehat{c_i}$ ) is greater or less than the constant in $O(1)$ for the actual cost ($c_i$) for an operation.


$$begin{array}{|c|c|c|} hline
text{Sl no.}&text{Operation}&widehat{c_i}&c_i&text{Method of cal. of $widehat{c_i}$}&text{Cal. Steps}&text{Intuition}\ hline
1&text{Make-Fib-Heap}&O(1)&O(1)&text{Asymptotic}&DeltaPhi=0text{ ; $widehat{c_i}=c_i=O(1)$} &text{None}\
hline
2&text{Fib-Heap-Insert}&O(1)&O(1)&text{Asymptotic}&DeltaPhi=1 text{ ; $widehat{c_i}=c_i=O(1)+1=O(1)$} &text{None}\
hline
3&text{Fib-Heap-Min}&O(1)&O(1)&text{Asymptotic}&DeltaPhi=0;text{ ; $widehat{c_i}=c_i=O(1)$} &text{None}\
hline
4&text{Fib-Heap-Union}&O(1)&O(1)&text{Asymptotic}&DeltaPhi=0;text{ ; $widehat{c_i}=c_i=O(1)$} &text{None}\
hline
5&text{Fib-Extract-Min}&O(D(n))&O(D(n)+t(n))&text{Asymptotic}&DeltaPhi=D(n)-t(n)+1 &text{$dagger$}\
hline
6&text{Fib-Heap-Decrease-Key}&O(1)&O(c)&text{Asymptotic}&DeltaPhi=4-c &text{$ddagger$}\
hline
end{array}$$


$dagger$ – The cost of performing each link is paid for by the reduction in potential due to the link’s reducing the number of roots by one.

$ddagger$ – Why the potential function was defined to include a term that is twice the number of marked nodes. When a marked node $у$ is cut by a cascading cut, its mark bit is cleared, so the potential is reduced by $2$. One unit of potential pays for the cut and the clearing of the mark bit, and the other unit compensates for the unit increase in potential due to node $у$ becoming a root.


Moreover the authors deal with a notion of marking the nodes of Fibonacci Heaps with the background that they are used to bound the amortized running time of the $text{Decrease-Key}$ or $text{Delete}$ algorithm, but not much intuition is given behind their use of it. What things shall go bad if we do not use markings or use $text{Cacading-Cut}$ when the number of children lost from a node is not just $2$ but possibly more. The excerpt corresponding to this is as follows:

We use the mark fields to obtain the desired time bounds. They record a little piece of the history of each node. Suppose that the following events have happened to node $x$:

  1. at some time, $x$ was a root,
  2. then $x$ was linked to another node,
  3. then two children of $x$ were removed by cuts.

As soon as the second child has been lost, we cut $x$ from its parent, making it a new root. The field $mark(x)$ is true if steps $1$ and $2$ have occurred and one child of $x$ has been cut. The Cut procedure, therefore, clears $mark(x)$ in line $4$, since it performs step $1$. (We can now see why line $3$ of $text{Fib-Heap-Link}$ clears $mark(y)$: node $у$ is being linked to another node, and so step $2$ is being performed. The next time a child of $у$ is cut, $mark(y)$ will be set to $text{TRUE}$.)


Strictly I do not get the intuition behind the $mark$ in the above block text especially the logic of doing the stuff in bold-italics.


Note: It is quite a difficult question in the sense that it involves the description the problem which I am facing to understand the intuition behind the concept of Fibonacci Heap operations which is in fact related to an entire chapter in the CLRS text. If it demands too much in a single then please do tell me then I shall split it accordingly into parts. I have made my utmost attempt to make the question the clear. If at places the meaning is not clear, then please do tell me then I shall rectify it. The entire corresponding portion of the text can be found here. (Even the authors say that it is a difficult data structure, having only theoretical importance.)

fibonacci recurrence relation proof – Mathematics Stack Exchange

I’ve been trying to prove the closed form solution of fibonacci recurrence sequence and achieve this

$a_n=frac{1}{sqrt{5}}((frac{1+sqrt{5}}{2})^n−(frac{1-sqrt{5}}{2})^n)$

And so far I haven’t achieve that, this is how I did it

$a_n=x(frac{1+sqrt{5}}{2})^n+y(frac{1-sqrt{5}}{2})^n$

$a_0=0=x+y$

$a_1=1=x(frac{1+sqrt{5}}{2})+y(frac{1-√5}{2})$

thus, I was able to get $x=frac{sqrt{5}+5}{10}$ and $y=-frac{sqrt{5}+5}{10}$. Then plugging in $x$ and $y$ to the formula this is what I got

$a_n=frac{sqrt{5}+5}{10}(frac{1+sqrt{5}}{2})^n+(-frac{sqrt{5}+5}{10})(frac{1-sqrt{5}}{2})^n$

beyond that, I just can’t prove the closed form from above, I’m stuck to this, since I can’t or don’t know how to further reduce $frac{sqrt{5}+5}{10}$.

Did I miss anything? or got something wrong?

fibonacci numbers – Proving this $F_{n+1} cdot F_{n-1} – F^2_n = (-1)^n$ by induction

Note: Based on your answers and on what I have learnt, I will try to give my complete easy answer to this question/problem.

Ignoring the base case, which I think all we agree that I proved in my question, I will pass directly to the inductive step:

I will assume that $F_{n+1} cdot F_{n-1} – F^2_n = (-1)^n$ is true for $n$, and I will try to prove that also $F_{n+2} cdot F_{n} – F^2_{n+1} = (-1)^{n+1}$ is true for $n + 1$.

The most important thing to note (immediately from the beginning) is that if $(-1)^n$ is even, then $(-1)^{n+1}$ is odd, and vice-versa, that is if $(-1)^n$ is odd, then $(-1)^{n+1}$ is even. This because, remember, a negative number raised to the power of an even number, becomes a positive number, but if raised to the power of an odd number, remains a negative number.

That said, we can try to verify if the following equation is true:

$$F_{n+1}cdot F_{n-1}-F_n^2 = -(F_{n+2}cdot F_n-F_{n+1}^2)$$

Now, we must have some imagination, or try some times to come out with something useful. In this case, I replaced $F_{n + 2}$ on the right side expression with $(F_{n + 1} + F_n)$, from the definition given in my question of $F_n$ (I must admit this step is one of the most difficult steps):

$$F_{n+1}cdot F_{n-1}-F_n^2 = -((F_{n + 1} + F_n)cdot F_n-F_{n+1}^2)$$

Now, I will just distribute the right side expression:

$$F_{n+1}cdot F_{n-1}-F_n^2 = -(F_{n + 1} cdot F_n + F^2_n – F_{n+1}^2)$$

In the following step, I will just exchange the position of $F_{n+1}^2$ with $F^2_n$, because it comes out that is the right thing to do (magical step, eh? this is why maths is considered difficult, because it’s a lot of imagination and providences of god)

$$F_{n+1}cdot F_{n-1}-F_n^2 = -(F_{n + 1} cdot F_n – F_{n+1}^2 + F^2_n)$$

Picking from the first 2 terms of the right side expression $F_{n + 1}$, we have:

$$F_{n+1}cdot F_{n-1}-F_n^2 = -(F_{n + 1}cdot (F_n – F_{n+1}) + F^2_n)$$

Now, try to guess what $(F_n – F_{n+1})$ is?

(yes, don’t be mad with me, I did not invent this)

From the definition of what $F_n$ is in my question, we arrive to say that:

$$F_n – F_{n+1} = -F_{n- 1}$$

$$-F_{n+1} = -F_{n- 1} – F_n $$

$$F_{n+1} = F_n + F_{n – 1} $$

Thus, $(F_n – F_{n+1})$ can be replaced with $-F_{n- 1}$ in my right side expression, and we obtain:

$$F_{n+1}cdot F_{n-1}-F_n^2 = -( -F_{n + 1}cdot F_{n- 1} + F^2_n)$$

Simplifying the minuses, we have:

$$F_{n+1}cdot F_{n-1}-F_n^2 = F_{n + 1}cdot F_{n- 1} – F^2_n$$

which is true, so we proved that if $P(n)$ is true, then also $P(n + 1)$, for all $n > 1$.