This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A269253 #57 Apr 03 2023 10:36:13 %S A269253 2,3,11,5,29,7,-1,71,89,11,131,13,181,-1,239,17,5167,19,379,419,461, %T A269253 23,-1,599,251894449,701,20357,29,25171,31,991,36002209323169, %U A269253 47468744103199,-1,1259,37,2625505273,1481,1559,41,1721,43,150103799,1979,2069,47,-1,2351,287762399 %N 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). %C A269253 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. %C A269253 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 %C A269253 For detailed theory, see [Hone]. - _L. Edson Jeffery_, Feb 09 2018 %H A269253 Hans Havermann, <a href="/A269253/b269253.txt">Table of n, a(n) for n = 1..300</a> %H A269253 C. K. Caldwell, Top Twenty page, <a href="https://t5k.org/top20/page.php?id=47">Lehmer number</a> %H A269253 Andrew N. W. Hone, et al., <a href="https://arxiv.org/abs/1802.01793">On a family of sequences related to Chebyshev polynomials</a>, arXiv:1802.01793 [math.NT], 2018. %H A269253 Wikipedia, <a href="http://en.wikipedia.org/wiki/Lehmer_number">Lehmer number</a> %F A269253 If n is prime then a(n-1) = n. %t A269253 terms = 172; %t A269253 kmax = 120; %t A269253 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]]]]]; %t A269253 Array[a, terms] /. Null -> -1 (* _Jean-François Alcover_, Aug 30 2018 *) %o A269253 (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; %Y A269253 Cf. A117522, A269251, A269252, A269254. %Y A269253 Cf. A294099, A298675, A298677, A298878, A299045, A299071, A285992, A299107, A299109, A088165, A299100, A299101, A113501. %K A269253 sign %O A269253 1,1 %A A269253 _Arkadiusz Wesolowski_, Jul 09 2016