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 A382231 #16 Mar 31 2025 21:26:48 %S A382231 645,1045,1281,2465,2821,3201,3605,7701,8965,12545,15841,17633,18565, %T A382231 20501,23585,24661,25761,26885,30401,34133,36741,45141,51221,52801, %U A382231 57685,59361,62785,66305,68101,71765,73633,89441,95765,100101,116033,120801,123221,125665,138245 %N A382231 Octagonal numbers that are the product of three distinct primes. %C A382231 All terms are odd numbers. %e A382231 645 is a term because 645=3*5*43 is a sphenic number and is the 15th octagonal number. %e A382231 1045 is a term because 1045=5*11*19 is a sphenic number and is the 19th octagonal number. %e A382231 1281 is a term because 1281=3*7*61 is a sphenic number and is the 21st octagonal number. %p A382231 N:= 10^6: # for terms <= N %p A382231 isoct:= proc(n) issqr(1+3*n) and sqrt(1+3*n) mod 3 = 2 end proc: %p A382231 P:= select(isprime,[seq(i,i=3..N/15,2)]): nP:= nops(P): %p A382231 R:= NULL: %p A382231 for i from 1 to nP while P[i]*P[i+1]*P[i+2] <= N do %p A382231 for j from i+1 to nP while P[i]*P[j]*P[j+1] <= N do %p A382231 for k from j+1 to nP do %p A382231 v:= P[i]*P[j]*P[k]; %p A382231 if v > N then break fi; %p A382231 if isoct(v) then R:= R,v fi; %p A382231 od od od: %p A382231 sort([R]); # _Robert Israel_, Mar 19 2025 %t A382231 Select[Table[n*(3*n-2), {n, 1, 220}], FactorInteger[#][[;;, 2]] == {1, 1, 1} &] (* _Amiram Eldar_, Mar 19 2025 *) %Y A382231 Intersection of A007304 and A000567. %Y A382231 Cf. A259677. %K A382231 nonn %O A382231 1,1 %A A382231 _Massimo Kofler_, Mar 19 2025