login
Semiprimes m = p*q where m, p and q are in A033638 (locations of right angle turns in Ulam square spiral).
1

%I #14 Feb 23 2020 16:15:07

%S 10,21,26,65,91,111,785,842,1333,4097,21171,28562,50851,100807,194923,

%T 970226,1000001,37021141,65618101,81144065,151782401,151819363,

%U 174134417,577921601,688773781,796622401,796678851,1276025563,2090501285,2176782337

%N Semiprimes m = p*q where m, p and q are in A033638 (locations of right angle turns in Ulam square spiral).

%C The sequence is probably infinite.

%C A geometric property of the sequence: consider the first diagonal with numbers of the form f(k) = k^2 + k + 1 in the Ulam spiral. The semiprimes and their prime factors belonging to the diagonal are given by the subsequence: 21, 91, 1333, 50851, 194923, 37021141, 65618101, 151819363, 688773781, 796622401, 1276025563, 3662246773, 6059299123, 6879790081, ... (see the illustration). This subsequence is the result of the following property: f(k)*f(k+1) = f((k+1)^2).

%C Examples:

%C 21 = 3*7 = f(1)*f(2) = f(4);

%C 91 = 7*13 = f(2)*f(3) = f(9);

%C 1333 = 31*43 = f(5)*f(6) = f(36);

%C ................................

%C This subsequence is probably infinite.

%H Michel Lagneau, <a href="/A331997/a331997.pdf">Ulam Spiral</a>

%e 111 is in the sequence because 111 = 3*37, and the numbers 3, 37 and 111 are in A033638.

%p with(numtheory):nn:=10^5:T1:=1:

%p lst:={1}:lst1:={}:

%p for n from 2 to nn do:

%p T2:= T1 + floor(n/2):lst:=lst union {T2}:T1:=T2:

%p od:

%p for j from 2 to nn do:

%p x:=lst[j]:d:=factorset(x):n0:=nops(d):

%p if n0=2 and bigomega(x)=2

%p and {d[1],d[2]} intersect lst = {d[1],d[2]}

%p then

%p lst1:=lst1 union {lst[j]}

%p else

%p fi:

%p od:

%p sort(lst1);

%o (PARI) lista(nn) = {my(vn = vector(nn, k, k^2\4 + 1)); for (i=1, #vn, if (bigomega(vn[i]) == 2, my(f=factor(vn[i])); my(p=f[1,1], q = f[2,1]); if (vecsearch(vp, p) && vecsearch(vp, q), print1(vn[i], ", "));););} \\ _Michel Marcus_, Feb 04 2020

%Y Cf. A001358, A033638, A172979.

%K nonn

%O 1,1

%A _Michel Lagneau_, Feb 04 2020