The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A187401 Numbers k such that k^2 + 1 = p*q, p and q primes and |p-q| is square. 1
 30, 100, 144, 274, 484, 516, 526, 756, 1046, 1250, 1714, 1806, 1834, 2284, 2440, 2610, 2940, 3524, 3824, 4190, 5084, 5746, 6766, 7486, 9746, 9920, 10310, 13024, 13210, 15396, 16916, 17546, 18726, 19256, 20000, 21194, 23214, 24964, 30370, 30394, 31126, 31496, 35180, 36680, 37816 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Note that if k^2+1 = p*q, then p+q cannot be a square. Proof by contradiction. There are two cases: p an odd prime and p=2. Case 1: suppose p and q are odd primes and q = y^2-p. Note that y must be an even number in order for q to be odd. Then p(y^2-p) = x^2+1 for some even x. Rearranging terms, we obtain p*y^2-1 = p^2+x^2. Looking at this equation modulo 4, we obtain -1 = 1, a contradiction. Case 2: Let p=2. Then we obtain 2y^2-x^2 = 5, which has no solutions in integers. - T. D. Noe, Mar 10 2011 LINKS Robert Israel, Table of n, a(n) for n = 1..600 EXAMPLE 20000 is in the sequence because 20000^2+1 = 19801 * 20201 and 20201 - 19801 = 20^2. MAPLE with(numtheory):nn:=50000:for i from 1 to nn do: n:=i^2+1:x:=factorset(n):x1:=nops(x):x2:=bigomega(n):if  x1=2 and x2=2 then z:=x-x :w:=sqrt(z):if w= floor(w) then printf(`%d,  `, i):else fi:else fi :od: # Alternative: N:= 500: # to get a(1) to a(N) count:= 0: for k from 2 by 2 while count < N do   f:= ifactors(k^2+1);   if nops(f) = 2 and {f[1, 2], f[2, 2]}={1} and issqr(abs(f[1, 1]-f[2, 1])) then     count:= count+1;     A[count]:= k;   fi od: seq(A[i], i=1..count); # Robert Israel, Jun 09 2014 MATHEMATICA okQ[k_] := Module[{ff = FactorInteger[k^2+1]}, Length[ff] == 2 && ff[[All, 2]] == {1, 1} && IntegerQ[Sqrt[ff[[2, 1]] - ff[[1, 1]]]]]; Select[Range[2, 40000, 2], okQ] (* Jean-François Alcover, Jun 25 2019 *) PROG (Sage) A = [] for k in range(2, 2000, 2):     K = k^2 + 1     f = prime_divisors(K)     if len(f) == 2:         if mul(f) == K:             if is_square(abs(f-f)):                 A.append(k) print A # Peter Luschny, Jun 10 2014 CROSSREFS Cf. A134406, A134407, A002522, A005574. Sequence in context: A008525 A303859 A002758 * A130863 A070114 A070132 Adjacent sequences:  A187398 A187399 A187400 * A187402 A187403 A187404 KEYWORD nonn AUTHOR Michel Lagneau, Mar 09 2011 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 23 04:16 EST 2020. Contains 331168 sequences. (Running on oeis4.)