cp's OEIS Frontend

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.

A369238 Tetraprime numbers differing by more than 3 from any other squarefree number.

This page as a plain text file.
%I A369238 #29 Jan 20 2025 03:55:32
%S A369238 72474,106674,193026,237522,261478,308649,342066,370785,391674,491322,
%T A369238 604878,865974,885477,931022,938598,1005630,1070727,1152822,1186926,
%U A369238 1206822,1289978,1306878,1363326,1371774,1392726,1412918,1455249,1528111,1634227,1654678,1688478
%N A369238 Tetraprime numbers differing by more than 3 from any other squarefree number.
%C A369238 Tetraprimes are the product of four distinct prime numbers (cf. A046386).
%H A369238 Robert Israel, <a href="/A369238/b369238.txt">Table of n, a(n) for n = 1..5415</a>
%e A369238 72474 = 2 * 3 * 47 * 257 is a tetraprime; 72471 = 3 * 7^2 * 17 * 29, 72472 = 2^3 * 9059, 72473 = 23^2 * 137, 72475 = 5^2 * 13 * 223, 72476 = 2^2 * 18119, 72477 = 3^2 * 8053 are all nonsquarefree numbers, so 72474 is a term.
%p A369238 N:= 3*10^6: # for terms <= N
%p A369238 P:= select(isprime,[2,seq(i,i=3 .. N/30,2)]): nP:= nops(P):
%p A369238 filter:= proc(x) not ormap(numtheory:-issqrfree, [x-3,x-2,x-1,x+1,x+2,x+3]) end proc:
%p A369238 R:= NULL:
%p A369238 for i1 from 1 to nP do
%p A369238   r1:= P[i1];
%p A369238   for i2 from 1 to i1-1 do
%p A369238     r2:= r1 * P[i2]; if r2 > N/6 then break fi;
%p A369238     for i3 from 1 to i2-1 do
%p A369238       r3:= r2 * P[i3]; if r3 > N/2 then break fi;
%p A369238       for i4 from 1 to i3-1 do
%p A369238         r:= r3 * P[i4];
%p A369238         if r > N then break fi;
%p A369238         if filter(r) then R:= R,r; fi
%p A369238 od od od od:
%p A369238 sort([R]); # _Robert Israel_, Jan 19 2025
%t A369238 f[n_] := Module[{e = FactorInteger[n][[;; , 2]], p}, p = Times @@ e; If[p > 1, 0, If[e == {1, 1, 1, 1}, 1, -1]]]; SequencePosition[Array[f, 2*10^6], {0, 0, 0, 1, 0, 0, 0}][[;; , 1]] + 3 (* _Amiram Eldar_, Jan 19 2024 *)
%Y A369238 Cf. A046386, A013929. Subsequence of A268332.
%K A369238 nonn
%O A369238 1,1
%A A369238 _Massimo Kofler_, Jan 19 2024