OFFSET
1,1
COMMENTS
Equivalent to: for k >= 3, products of all Pythagorean k-tuples comprised of only primes, with each term as such representing exactly 1 k-tuple.
Subsequence of A390574, which includes square terms.
240 is the only term with <= 6 total prime factors. Proof: squares of odd numbers are always 1 mod 8, and because the largest prime factor of nonsquare terms must be odd, factorizations of {2, 2, odd, odd} and {2, 2, 2, 2, odd, odd} are the only ones possible with <= 6 factors. Of these, the former is impossible because no two prime squares differ by 8, and for the latter, 3 and 5 are the only primes whose squares differ by 16, giving 2*2*2*2*3*5 = 240.
A similar proof provides that terms for which all of the prime factors are distinct must have >= 15 factors, and that odd terms for which all of the prime factors are distinct must have >= 18 factors. The smallest examples of these are 2221594309375210770 (greatest factor = A385967(10) = 103) and 11704510329137474729936055 (greatest factor = 151) respectively.
Terms are congruent to {0, 3, 4, 6, 8, 9} (mod 12). - Robert G. Wilson v, Jan 05 2026
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..8655
EXAMPLE
3402 is a term because the prime factors of 3402 are {2, 3, 3, 3, 3, 3, 7} and 2^2 + 3^2 + 3^2 + 3^2 + 3^2 + 3^2 = 7^2.
MATHEMATICA
f[{p_, e_}]:=Table[p^2, e]; lps[k_]:=Last[f/@FactorInteger[k]//Flatten]; sum[k_]:=Total[f/@FactorInteger[k]//Flatten]; Select[Range[10^6], PrimeNu[#]>1&&sum[#]==2*lps[#]&] (* James C. McMahon, Jan 03 2026 *)
fQ = Compile[{{n, _Integer}}, If[ MemberQ[{0, 3, 4, 6, 8, 9}, Mod[n, 12]], Block[{fi = FactorInteger@ n}, Length@ fi > 1 && Sum[ fi[[i, 2]]*fi[[i, 1]]^2, {i, Length@ fi}] == 2 fi[[-1, 1]]^2], False]]; Select[ Range@ 10000000, fQ] (* Robert G. Wilson v, Jan 05 2026 *)
PROG
(PARI) is_a391874(n)={my(f=Vec(factor(n))); f[2][#f[2]]--; return(if(!issquare(n) && f[1][#f[1]]^2==sum(i=1, #f[1], f[1][i]^2*f[2][i]), 1, 0))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles L. Hohn, Dec 21 2025
STATUS
approved
