login
Prime terms in the sequence of Pell numbers, A000129.
9

%I #50 Jan 03 2019 17:45:00

%S 2,5,29,5741,33461,44560482149,1746860020068409,68480406462161287469,

%T 13558774610046711780701,4125636888562548868221559797461449,

%U 4760981394323203445293052612223893281

%N Prime terms in the sequence of Pell numbers, A000129.

%C Previous Name: Primes found among the denominators of the continued fraction rational approximations to sqrt(2).

%C See A096650 for the indices. - _Jon E. Schoenfield_, Jan 25 2017

%C A056869 is essentially the same sequence. - _Jianing Song_, Jan 02 2019

%H Harvey P. Dale, <a href="/A086383/b086383.txt">Table of n, a(n) for n = 1..23</a>

%H J. L. Schiffman, <a href="http://archives.math.utk.edu/ICTCM/i/24/C027.html">Exploring the Fibonacci sequence of order two with CAS technology</a>, Paper C027, Electronic Proceedings of the Twenty-fourth Annual International Conference on Technology in Collegiate Mathematics, Orlando, Florida, March 22-25, 2012. See p. 262. - _N. J. A. Sloane_, Mar 27 2014

%F a(n) = A000129(A096650(n)). - _Jon E. Schoenfield_, Jan 25 2017

%F a(n) = A056869(n-1), n > 1. - _Jianing Song_, Jan 02 2019

%e a(1) = 2 = A000129(2), a(2) = 5 = A000129(3), a(3) = 29 = A000129(5), etc. - _Zak Seidov_, Oct 21 2013 [Corrected by _Jianing Song_, Jan 02 2019]

%t Select[Table[ChebyshevU[k,3]-ChebyshevU[k-1,3],{k,0,50}],PrimeQ] (* _Ed Pegg Jr_, May 10 2007 *)

%t Select[Denominator[Convergents[Sqrt[2],150]],PrimeQ] (* _Harvey P. Dale_, Dec 19 2012 *)

%t Select[LinearRecurrence[{2, 1}, {0, 1}, 16], PrimeQ] (* _Zak Seidov_, Oct 21 2013 *)

%o (PARI) \\ Continued fraction rational approximation of numeric constants f. m=steps.

%o cfracdenomprime(m,f) = { default(realprecision,3000); cf = vector(m+10); x=f; for(n=0,m, i=floor(x); x=1/(x-i); cf[n+1] = i; ); for(m1=0,m, r=cf[m1+1]; forstep(n=m1,1,-1, r = 1/r; r+=cf[n]; ); numer=numerator(r); denom=denominator(r); if(ispseudoprime(denom),print1(denom,",")); ) }

%o (GAP) f:=[0,1];; for n in [3..100] do f[n]:=2*f[n-1]+f[n-2]; od; a:=Filtered(f,IsPrime);; Print(a); # _Muniru A Asiru_, Jan 03 2019

%Y Cf. A000129, A056869, A096650.

%K nonn

%O 1,1

%A _Cino Hilliard_, Sep 06 2003; corrected Jul 30 2004

%E Name changed (to a Comments entry from _Zak Seidov_, Oct 21 2013) by _Jon E. Schoenfield_, Jan 26 2017