/-
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.
-/
import FormalConjecturesUtil
namespace OeisA116150open BigOperatorsa n is the sum of $3^j + (-2)^j$ for j from 1 to n.
def a (n : ℕ) : ℕ :=
(∑ j ∈ Finset.Icc 1 n, ((3 : ℤ) ^ j + ((-2) : ℤ) ^ j)).toNat@[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 = 14 := ⊢ a 2 = 14 All goals completed! 🐙@[category test, AMS 11]
theorem a_3 : a 3 = 33 := ⊢ a 3 = 33 All goals completed! 🐙@[category test, AMS 11]
theorem a_4 : a 4 = 130 := ⊢ a 4 = 130 All goals completed! 🐙@[category test, AMS 11]
theorem a_5 : a 5 = 341 := ⊢ a 5 = 341 All goals completed! 🐙First primes are $a(11) = 264353$ and $a(17) = 193622861$. Additional primes: $a(71)$, $a(91)$, $a(431)$. What is the next prime?
@[category research open, AMS 11]
theorem conjecture : answer(sorry) = a (sInf {n : ℕ | 431 < n ∧ (a n).Prime}) := ⊢ sorry = a (sInf {n | 431 < n ∧ Nat.Prime (a n)})
All goals completed! 🐙end OeisA116150