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.

A294751 Squarefree products of k primes that are symmetrically distributed around their average. Case k = 4.

This page as a plain text file.
%I A294751 #17 May 20 2019 02:44:35
%S A294751 2145,4641,4845,5005,9177,11305,13485,13585,17017,21489,21505,23529,
%T A294751 26445,31465,31857,33649,35409,35581,36685,42441,43401,46189,46345,
%U A294751 49569,50065,53985,60697,61705,63085,63597,65569,67821,69745,77745,80845,83049,87505,88881
%N A294751 Squarefree products of k primes that are symmetrically distributed around their average. Case k = 4.
%H A294751 Robert Israel, <a href="/A294751/b294751.txt">Table of n, a(n) for n = 1..10000</a>
%e A294751 2145 = 3*5*11*13. Prime factors average is (3 + 5 + 11 + 13)/4 = 8 and 3 + 5 = 8 = 13 - 5, 5 + 3 = 8 = 11 - 3.
%p A294751 with(numtheory): P:=proc(q,h) local a,b,k,n,ok;
%p A294751 for n from 2*3*5*7 to q do if not isprime(n) and issqrfree(n) then a:=ifactors(n)[2];
%p A294751 if nops(a)=h then b:=2*add(a[k][1],k=1..nops(a))/nops(a); ok:=1;
%p A294751 for k from 1 to trunc(nops(a)/2) do if a[k][1]+a[nops(a)-k+1][1]<>b then ok:=0; break; fi; od; if ok=1 then print(n); fi; fi; fi; od; end: P(10^9,4);
%p A294751 # Alternative:
%p A294751 N:= 10^5: # to get terms <= N
%p A294751 M:= floor(max(fsolve(3*5*(M-5)*(M-3) = N))):
%p A294751 P:= select(isprime, [seq(i,i=3..M/2,2)]): nP:= nops(P):
%p A294751 Res:= NULL:
%p A294751 for m from 10 by 2 to M do
%p A294751   for ix from 1 to nP-2 do
%p A294751     x:= P[ix];
%p A294751     if x >= m/2 or (x*(m-x))^2 >= N then break fi;
%p A294751     if not isprime(m-x) then next fi;
%p A294751     for iy from ix+1 to nP-1 do
%p A294751       y:= P[iy];
%p A294751       if y >= m/2 or x*(m-x)*y*(m-y) >= N then break fi;
%p A294751       if not isprime(m-y) then next fi;
%p A294751       Res:= Res, x*(m-x)*y*(m-y);
%p A294751 od od od:
%p A294751 sort([Res]); # _Robert Israel_, May 19 2019
%o A294751 (PARI) isok(n, nb=4) = {if (issquarefree(n) && (omega(n)==nb), f = factor(n)[, 1]~; avg = vecsum(f)/#f; for (k=1, #f\2, if (f[k] + f[#f-k+1] != 2*avg, return(0));); return (1););} \\ _Michel Marcus_, Nov 10 2017
%Y A294751 Subsequence of A046386.
%Y A294751 Cf. A006881 (k=2), A262723 (k=3), A294752 (k=5), A294776 (k=6).
%K A294751 nonn
%O A294751 1,1
%A A294751 _Paolo P. Lava_, Nov 08 2017
%E A294751 More terms from _Giovanni Resta_, Nov 09 2017