OFFSET
1,1
COMMENTS
When 2n + 1 = p is prime, a(n) = p.
From Robert Israel, Sep 26 2017: (Start)
a(n) is also the first prime in the sequence defined by the recursion x(k+2)=2*x(k+1)+(2*n-1)*x(k) with x(0)=x(1)=1.
a(307), if it exists, has more than 10000 digits.
It appears that x(n*k) is divisible by x(k) if n is odd. Thus a(n) (if it exists) must be x(k) where k is either a power of 2 or a prime. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..306
EXAMPLE
For k = {1, 2, 3, 4}, (1/2)((1 + sqrt(8))^k + (1 - sqrt(8))^k) = {1, 9, 25, 113}. 113 is prime, so a(4) = 113.
MAPLE
f:= proc(n) local a, b, t;
a:= 1; b:= 1;
do
t:= a; a:= 2*a + (2*n-1)*b;
if isprime(a) then return a fi;
b:= t;
od
end proc:
map(f, [$1..100]); # Robert Israel, Sep 26 2017
MATHEMATICA
f[n_, k_] := ((1 + Sqrt[n])^k + (1 - Sqrt[n])^k)/2;
Table[k = 1; While[! PrimeQ[Expand@f[2n, k]], k++]; Expand@f[2n, k], {n, 52}]
CROSSREFS
KEYWORD
nonn
AUTHOR
XU Pingya, Sep 24 2017
STATUS
approved