%I #12 Oct 13 2019 18:04:38
%S 102,162,210,358,402,582,678,1042,1158,1170,1222,1350,1478,1638,1698,
%T 1798,1830,2082,2178,2338,2342,2502,2790,2898,3238,3282,3462,3602,
%U 3618,3858,3942,4038,4498,4518,4998,5202,5250,5510,5862,5922,6150,6342,6930,6978,7122
%N Consider the numbers of the form k^2 + 1 = p*q, p, q primes, where each sum p + q is constant for all k in the set {k_1, k_2, ..., k_r} (A181177). The sequence lists the corresponding sums p + q.
%C Or non-unique sums p + q corresponding to the semiprimes of the form k^2 + 1 = p*q.
%C Consider the array A(n,k) read by rows where the row n contains all the elements having the property that A(n,k)^2 + 1 is the product of two primes p(n,k) and q(n,k) with sum S(n,k) = p(n,k) + q(n,k) constant for all k in the set {k_1, k_2, ..., k_r} (see A181177). The sequence lists the numbers a(n) = S(n, k).
%C Property of the sequence:
%C We observe that a(n) == 2, 6 or 18 (mod 32) => a(n)^2 + 1 == 5 (mod 32).
%C The finite set of numbers q such that a(n)^2 + 1 == r1 or r2 (mod q) is {3, 5, 6, 9, 10, 12, 18, 20, 24, 36, 40, 48, 64, 72, 80, 96, 144, 160, 288} with the corresponding pairs of residues (r1, r2) = (1, 2), (0, 1), (1, 5, (1, 5), (1, 5), (1, 5), (1, 5), (1, 5), (5, 13), (1, 5), (5, 21), (5, 37), (5, 37), (5, 37), (5, 21), (5, 37), (5, 37), (5, 101) and (5, 37). For example, a(n)^2 + 1 == 5 or 37 (mod 288). The number 288 is the greatest possible value.
%C We observe that a(n)^4 + 1 == 17 (mod 256).
%C The following table gives the first 10 values of a(n) with the corresponding subsets {A(n,k)}, k = 1..N(n), where N(n) is the maximum number of elements of each subset.
%C +---+-----------------------------------------------------+------+-----+
%C | n | A(n,1) A(n,2) A(n,3) A(n,4) A(n,5) A(n,6)... | a(n) |N(n) |
%C +---+-----------------------------------------------------+------+-----+
%C | 1 | 22 34 46 50 | 102 | 4 |
%C | 2 | 28 44 76 | 162 | 3 |
%C | 3 | 80 100 | 210 | 2 |
%C | 4 | 42 114 | 358 | 2 |
%C | 5 | 104 136 | 402 | 2 |
%C | 6 | 86 254 266 274 | 582 | 4 |
%C | 7 | 58 106 154 194 286 334 | 678 | 6 |
%C | 8 | 324 456 504 516 | 1042 | 4 |
%C | 9 | 214 374 494 526 566 | 1158 | 5 |
%C |10 | 140 520 | 1170 | 2 |
%C +---+-----------------------------------------------------+------+-----+
%e a(1) = 102 because, for {A(1,k)} = {22, 34, 46, 50} we obtain:
%e 22^2 + 1 = 5*97 and 97 + 5 = 102;
%e 34^2 + 1 = 13*89 and 13 + 89 = 102;
%e 46^2 + 1 = 29*73 and 29 + 73 = 102;
%e 50^2 + 1 = 41*61 and 41 + 61 = 102.
%p nn:=10^4:
%p for n from 8 by 2 to nn do:
%p it:=0:
%p for k from 3 by 2 to n/2 do:
%p if k<n-k and isprime(k) and isprime(n-k)
%p and sqrt(k*(n-k)-1)=floor(sqrt(k*(n-k)-1))
%p then
%p it:=it+1:
%p else
%p fi:
%p od:
%p if it>1
%p then
%p printf(`%d, `,n):
%p else
%p fi:
%p od:
%t nmax=10000; p = Select[Range[nmax], PrimeQ]; Select[Range[nmax], Length[Select[ Sqrt[-1 + Times@@@IntegerPartitions[#, {2}, p]], IntegerQ]] > 1 &] (* _Amiram Eldar_, Dec 15 2018 *)
%Y Cf. A181177.
%K nonn
%O 1,1
%A _Michel Lagneau_, Dec 15 2018