login
A269253
Smallest prime in the sequence s(k) = n*s(k-1) - s(k-2), with s(0) = 1, s(1) = n + 1 (or -1 if no such prime exists).
15
2, 3, 11, 5, 29, 7, -1, 71, 89, 11, 131, 13, 181, -1, 239, 17, 5167, 19, 379, 419, 461, 23, -1, 599, 251894449, 701, 20357, 29, 25171, 31, 991, 36002209323169, 47468744103199, -1, 1259, 37, 2625505273, 1481, 1559, 41, 1721, 43, 150103799, 1979, 2069, 47, -1, 2351, 287762399
OFFSET
1,1
COMMENTS
For n >= 3, smallest prime of the form (x^y - 1/x^y)/(x - 1/x), where x = (sqrt(n+2) +/- sqrt(n-2))/2 and y is an odd positive integer, or -1 if no such prime exists.
When n=7, the sequence {s(k)} is A033890, which is Fibonacci(4i+2), and since x|y <=> F_x|F_y, and 2i+1|4i+2, A033890 is never prime, and so a(7) = -1. What is the proof for the other entries that are -1? Answer: See the Comments in A269254. - N. J. A. Sloane, Oct 22 2017
For detailed theory, see [Hone]. - L. Edson Jeffery, Feb 09 2018
LINKS
C. K. Caldwell, Top Twenty page, Lehmer number
Andrew N. W. Hone, et al., On a family of sequences related to Chebyshev polynomials, arXiv:1802.01793 [math.NT], 2018.
Wikipedia, Lehmer number
FORMULA
If n is prime then a(n-1) = n.
MATHEMATICA
terms = 172;
kmax = 120;
a[n_] := Module[{s, k}, s[k_] := s[k] = n s[k-1] - s[k-2]; s[0] = 1; s[1] = n+1; For[k = 1, k <= kmax, k++, If[PrimeQ[s[k]], Return[s[k]]]]];
Array[a, terms] /. Null -> -1 (* Jean-François Alcover, Aug 30 2018 *)
PROG
(Magma) lst:=[]; for n in [1..49] do if n gt 2 and IsSquare(n+2) then Append(~lst, -1); else a:=n+1; c:=1; if IsPrime(a) then Append(~lst, a); else repeat b:=n*a-c; c:=a; a:=b; until IsPrime(a); Append(~lst, a); end if; end if; end for; lst;
KEYWORD
sign
AUTHOR
STATUS
approved