login
Numbers k such that k^2 + 1 is divisible by precisely four distinct primes where the sum of the largest and the smallest is equal to the sum of the other two.
3

%I #16 Jan 15 2020 05:51:57

%S 948,1560,1772,13236,36984,40452,94536,100512,127224,425808,757382,

%T 850416,875784,1241106,2102736,3343164,4361808,4530480,5401464,

%U 8006700,8645004,9806604,10379136,10829580,11366424,11692746,13960260

%N Numbers k such that k^2 + 1 is divisible by precisely four distinct primes where the sum of the largest and the smallest is equal to the sum of the other two.

%H Amiram Eldar, <a href="/A192770/b192770.txt">Table of n, a(n) for n = 1..80</a> (terms below 10^9)

%e 1772 is in the sequence because 1772^2+1 = 5 * 17^2 * 41 * 53 and 5 + 53 = 17 + 41.

%p with(numtheory):for n from 1 to 100000 do:x:=n^2+1:y:=factorset(x):n1:=nops(y):if n1=4 and y[4] + y[1] = y[2]+y[3] then printf ( "%d %d \n",n,x):else fi:od:

%t seqQ[n_] := Module[{p = FactorInteger[n^2 + 1][[;;,1]]}, Length[p] == 4 && p[[1]] + p[[4]] == p[[2]] + p[[3]]]; Select[Range[10^6], seqQ] (* _Amiram Eldar_, Jan 15 2020 *)

%o (PARI) is(n)=my(f=factor(n^2+1)[,1]);#f==4&&f[1]+f[4]==f[2]+f[3]

%o forstep(n=2,1e7,2,if(is(n),print1(n", "))) \\ _Charles R Greathouse IV_, Jul 11 2011

%Y Cf. A180278, A192771.

%K nonn

%O 1,1

%A _Michel Lagneau_, Jul 09 2011

%E a(10)-a(27) from _Charles R Greathouse IV_, Jul 11 2011