A331997 Semiprimes m = p*q where m, p and q are in A033638 (locations of right angle turns in Ulam square spiral).
10, 21, 26, 65, 91, 111, 785, 842, 1333, 4097, 21171, 28562, 50851, 100807, 194923, 970226, 1000001, 37021141, 65618101, 81144065, 151782401, 151819363, 174134417, 577921601, 688773781, 796622401, 796678851, 1276025563, 2090501285, 2176782337, 3662246773, 6059299123, 6879790081
Offset: 1
Keywords
Examples
111 is in the sequence because 111 = 3*37, and the numbers 3, 37 and 111 are in A033638.
Links
- Michel Lagneau, Ulam Spiral
Programs
-
Maple
with(numtheory):nn:=10^5:T1:=1: lst:={1}:lst1:={}: for n from 2 to nn do: T2:= T1 + floor(n/2):lst:=lst union {T2}:T1:=T2: od: for j from 2 to nn do: x:=lst[j]:d:=factorset(x):n0:=nops(d): if n0=2 and bigomega(x)=2 and {d[1],d[2]} intersect lst = {d[1],d[2]} then lst1:=lst1 union {lst[j]} else fi: od: sort(lst1);
-
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
Extensions
More terms from Michel Marcus, Jan 13 2025
Comments