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.

A219313 Smallest number k such that LegendreP[2*n, k] is prime.

This page as a plain text file.
%I A219313 #14 Feb 16 2025 08:33:18
%S A219313 3,7,7,3,41,5,89,23,21,35,55,5,181,511,241,83,709,401,3653,901,137,
%T A219313 497,1411,121,281,209,201,191,1667,89,39,181,233,2783,85,911,1717,919,
%U A219313 97,1163,1319,971,361,2371,1573,121,817,733,1657,1895,509,431,2399,1483
%N A219313 Smallest number k such that LegendreP[2*n, k] is prime.
%C A219313 LegendreP [2*n, x] is the 2*n th Legendre polynomial of the first kind evaluated at x.
%C A219313 The corresponding primes are in A219315.
%D A219313 M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 798.
%H A219313 Robert Israel, <a href="/A219313/b219313.txt">Table of n, a(n) for n = 1..342</a>
%H A219313 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LegendrePolynomial.html">Legendre Polynomial</a>
%e A219313 a(1) = 3 because LegendreP[2*1, x] = (3x^2 - 1)/2 = P(x) and P(3) = 13 is prime.
%p A219313 f:= proc(n) local p,k,x;
%p A219313   p:= unapply(orthopoly[P](2*n,x),x);
%p A219313   for k from 1 by 2 do if isprime(p(k)) then return k fi od
%p A219313 end proc:
%p A219313 map(f, [$1..60]); # _Robert Israel_, Dec 26 2024
%t A219313 Table[k = 0; While[!PrimeQ[LegendreP [2*n,k]], k++]; k, {n, 70}]
%o A219313 (PARI) a(n)=my(P=pollegendre(2*n),k,t); while(denominator(t=subst(P,'x,k++))>1 || !ispseudoprime(t), ); k \\ _Charles R Greathouse IV_, Mar 18 2017
%Y A219313 Cf. A219315.
%K A219313 nonn
%O A219313 1,1
%A A219313 _Michel Lagneau_, Nov 17 2012