%I #9 Mar 30 2012 18:35:54
%S 3,0,5,2,3,0,5,3,7,0,13,2,11,0,13,3,19,0,17,0,3,0,0,2,23,0,29,0,31,0,
%T 29,7,3,0,37,0,0,0,5,2,43,0,41,0,43,0,0,11,47,0,5,0,0,0,53,3,7,0,61,2,
%U 59,0,61,17,3,0,0,0,7,0,73,5,71,0,73,0,79,0,0,19,79,0,0,2,3,0,89,5,0,0
%N a(n) = the smallest prime p such that np + 1 is a square, or 0 if no such square exists.
%C if n = A007510(k) (Single primes), then a(n) = 0.
%e a(6) = 0 because there is no prime p such that 6*p + 1 is a square.
%e a(11) = 13 because 11*13 + 1 = 144 is a square.
%p with(numtheory): for k from 1 to 120 do : q:=0:for p from 1 to 200 do : x:=sqrt(k*p+1)
%p : if x=trunc(x) and type(p,prime)=true and q=0 then q:=1: printf(`%d, `,p):else
%p fi:od:if q=0 then printf(`%d, `,q):else fi:od:
%Y Cf. A007510, A187884, 187885.
%K nonn,base
%O 1,1
%A _Michel Lagneau_, Mar 15 2011
|