/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
module
public import FormalConjecturesUtilLinear recurrence $a(n) = 5a(n-1) - 8a(n-2)$ with $a(0)=0, a(1)=1$
The sequence $a(n)$ satisfies the linear recurrence relation $a(n) = 5a(n-1) - 8a(n-2)$ with initial values $a(0) = 0$ and $a(1) = 1$.
References:
Conjectures involving primes and quadratic forms by Zhi-Wei Sun, arXiv:1211.1588 (2012)
@[expose] public sectionnamespace OeisA190969The sequence defined by $a(0) = 0$, $a(1) = 1$, and $a(n+2) = 5a(n+1) - 8a(n)$.
def a : ℕ → ℤ
| 0 => 0
| 1 => 1
| n + 2 => 5 * a (n + 1) - 8 * a n@[category test, AMS 11]
theorem a_0 : a 0 = 0 := ⊢ a 0 = 0 All goals completed! 🐙@[category test, AMS 11]
theorem a_1 : a 1 = 1 := ⊢ a 1 = 1 All goals completed! 🐙@[category test, AMS 11]
theorem a_2 : a 2 = 5 := ⊢ a 2 = 5 All goals completed! 🐙@[category test, AMS 11]
theorem a_3 : a 3 = 17 := ⊢ a 3 = 17 All goals completed! 🐙@[category test, AMS 11]
theorem a_4 : a 4 = 45 := ⊢ a 4 = 45 All goals completed! 🐙The modular sum $S(p) = \sum_{k=0}^{p-1} \frac{a(4k) \binom{2k}{k}^3}{(-4096)^k}$ evaluated in $\mathbb{Z}/p^m\mathbb{Z}$.
def sMod (p m : ℕ) : ZMod (p ^ m) :=
∑ k ∈ Finset.range p,
(a (4 * k) : ZMod (p ^ m)) * ((2 * k).choose k : ZMod (p ^ m)) ^ 3 *
((-4096 : ZMod (p ^ m)) ^ k)⁻¹Conjecture: Let $S(p) := \sum_{k=0}^{p-1} a(4k) \binom{2k}{k}^3 / (-4096)^k$. Then $S(p) \equiv 0 \pmod{p^2}$ for every odd prime $p$.
Zhi-Wei Sun, Mar 13 2013
@[category research open, AMS 11]
theorem conjecture_1 (p : ℕ) (hp : p.Prime) (hp2 : p ≠ 2) :
sMod p 2 = 0 := p:ℕhp:Nat.Prime php2:p ≠ 2⊢ sMod p 2 = 0
All goals completed! 🐙Conjecture: Let $S(p) := \sum_{k=0}^{p-1} a(4k) \binom{2k}{k}^3 / (-4096)^k$. Then $S(p) \equiv 0 \pmod{p^3}$ for any odd prime $p \equiv 1, 2, 4 \pmod 7$.
Zhi-Wei Sun, Mar 13 2013
@[category research open, AMS 11]
theorem conjecture_2 (p : ℕ) (hp : p.Prime) (hp2 : p ≠ 2)
(h7 : p % 7 ∈ ({1, 2, 4} : Finset ℕ)) :
sMod p 3 = 0 := p:ℕhp:Nat.Prime php2:p ≠ 2h7:p % 7 ∈ {1, 2, 4}⊢ sMod p 3 = 0
All goals completed! 🐙end OeisA190969