This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A331997 #17 Jan 13 2025 12:31:55 %S A331997 10,21,26,65,91,111,785,842,1333,4097,21171,28562,50851,100807,194923, %T A331997 970226,1000001,37021141,65618101,81144065,151782401,151819363, %U A331997 174134417,577921601,688773781,796622401,796678851,1276025563,2090501285,2176782337,3662246773,6059299123,6879790081 %N A331997 Semiprimes m = p*q where m, p and q are in A033638 (locations of right angle turns in Ulam square spiral). %C A331997 The sequence is probably infinite. %C A331997 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 A331997 Examples: %C A331997 21 = 3*7 = f(1)*f(2) = f(4); %C A331997 91 = 7*13 = f(2)*f(3) = f(9); %C A331997 1333 = 31*43 = f(5)*f(6) = f(36); %C A331997 ................................ %C A331997 This subsequence is probably infinite. %H A331997 Michel Lagneau, <a href="/A331997/a331997.pdf">Ulam Spiral</a> %e A331997 111 is in the sequence because 111 = 3*37, and the numbers 3, 37 and 111 are in A033638. %p A331997 with(numtheory):nn:=10^5:T1:=1: %p A331997 lst:={1}:lst1:={}: %p A331997 for n from 2 to nn do: %p A331997 T2:= T1 + floor(n/2):lst:=lst union {T2}:T1:=T2: %p A331997 od: %p A331997 for j from 2 to nn do: %p A331997 x:=lst[j]:d:=factorset(x):n0:=nops(d): %p A331997 if n0=2 and bigomega(x)=2 %p A331997 and {d[1],d[2]} intersect lst = {d[1],d[2]} %p A331997 then %p A331997 lst1:=lst1 union {lst[j]} %p A331997 else %p A331997 fi: %p A331997 od: %p A331997 sort(lst1); %o A331997 (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(vn, p) && vecsearch(vn, q), print1(vn[i], ", "));););} \\ _Michel Marcus_, Feb 04 2020 %Y A331997 Cf. A001358, A033638, A172979. %K A331997 nonn %O A331997 1,1 %A A331997 _Michel Lagneau_, Feb 04 2020 %E A331997 More terms from _Michel Marcus_, Jan 13 2025