cp's OEIS Frontend

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.

A292848 a(n) is the smallest prime of form (1/2)*((1 + sqrt(2*n))^k + (1 - sqrt(2*n))^k).

This page as a plain text file.
%I A292848 #25 Dec 13 2023 07:32:59
%S A292848 3,5,7,113,11,13,43,17,19,61,23,73,79,29,31,97,103,37,1241463763,41,
%T A292848 43,664973,47,2593,151,53,163,14972833,59,61,4217,193,67,23801,71,73,
%U A292848 223,229,79,241,83,7561,61068909859,89,271,277,283,97,10193,101,103,313
%N A292848 a(n) is the smallest prime of form (1/2)*((1 + sqrt(2*n))^k + (1 - sqrt(2*n))^k).
%C A292848 When 2n + 1 = p is prime, a(n) = p.
%C A292848 From _Robert Israel_, Sep 26 2017: (Start)
%C A292848 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.
%C A292848 a(307), if it exists, has more than 10000 digits.
%C A292848 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)
%H A292848 Robert Israel, <a href="/A292848/b292848.txt">Table of n, a(n) for n = 1..306</a>
%e A292848 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.
%p A292848 f:= proc(n) local a,b,t;
%p A292848   a:= 1; b:= 1;
%p A292848   do
%p A292848     t:= a; a:= 2*a + (2*n-1)*b;
%p A292848     if isprime(a) then return a fi;
%p A292848     b:= t;
%p A292848   od
%p A292848 end proc:
%p A292848 map(f, [$1..100]); # _Robert Israel_, Sep 26 2017
%t A292848 f[n_, k_] := ((1 + Sqrt[n])^k + (1 - Sqrt[n])^k)/2;
%t A292848 Table[k = 1; While[! PrimeQ[Expand@f[2n, k]], k++]; Expand@f[2n, k], {n, 52}]
%Y A292848 Cf. A001333, A026150, A046717, A084057, A002533, A083098, A083100, A003665, A002535, A133294, A090042, A125816, A133343, A133345, A120612, A133356, A125818.
%K A292848 nonn
%O A292848 1,1
%A A292848 _XU Pingya_, Sep 24 2017