Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 Feb 26 2024 01:28:13
%S 2526,44405,209674,220209,234622,328877,375823,409737,428947,473673,
%T 540026,569427,611174,736077,748673,758423,781747,800022,863722,
%U 889251,914878,927622,973927,982398,988478,994061,1003474,1021602,1072477,1088877,1150077,1157822,1158451,1211822
%N Sphenic numbers differing by more than 3 from any other squarefree number.
%C Sphenic numbers are the product of three distinct primes (cf. A007304).
%H Robert Israel, <a href="/A369521/b369521.txt">Table of n, a(n) for n = 1..3273</a> (all terms < 10^8)
%e 2526 = 2 * 3 * 421 is a sphenic number; 2523 = 3 * 29^2, 2524 = 2^2 * 631, 2525 = 5^2 * 101, 2527 = 7 * 19^2, 2528 = 2^5 * 79, 2529 = 3^2 * 281 are all nonsquarefree numbers, so 2526 is a term.
%p N:= 2*10^6: # to get all terms <= N
%p P:= select(isprime, [2,seq(i,i=3..N/6,2)]):
%p nP:= nops(P): R:= NULL:
%p for i from 1 do
%p p:= P[i]; if p^3 >= N then break fi;
%p for j from i+1 do
%p q:= P[j]: if p*q^2 >= N then break fi;
%p for k from j+1 to nP do
%p x:= p*q*P[k];
%p if x > N then break fi;
%p if not ormap(numtheory:-issqrfree, [x-3,x-2,x-1,x+1,x+2,x+3]) then R:= R,x fi
%p od od od:
%p sort([R]); # _Robert Israel_, Feb 25 2024
%t f[n_] := Module[{e = FactorInteger[n][[;; , 2]], p}, p = Times @@ e; If[p > 1, 0, If[e == {1, 1, 1}, 1, -1]]]; SequencePosition[Array[f, 2*10^6], {0, 0, 0, 1, 0, 0, 0}][[;; , 1]] + 3 (* _Amiram Eldar_, Jan 25 2024 *)
%Y Cf. A007304, A013929. Subsequence of A268332.
%K nonn
%O 1,1
%A _Massimo Kofler_, Jan 25 2024