close
login
A390574
Numbers for which the square of its largest prime factor equals the sum of the squares of its other prime factors.
1
4, 9, 25, 49, 121, 169, 240, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2240, 2809, 3402, 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12769, 16129, 17161, 18769, 19321, 21504, 22201, 22801, 24649, 26569, 27889, 29929
OFFSET
1,1
COMMENTS
All squares of primes (A001248) are terms because they contain exactly and only 2 equal prime factors.
No squares of nonprimes (A062312) are terms because they contain 2 of the same largest prime factor plus additional prime factors.
Subsequence of only nonsquare terms is A391874.
EXAMPLE
a(1) = 4 is a term because the prime factors of 4 are {2, 2} and 2^2 = 2^2.
a(7) = 240 is a term (the first nonsquare term) because the prime factors of 240 are {2, 2, 2, 2, 3, 5} and 2^2 + 2^2 + 2^2 + 2^2 + 3^2 = 5^2.
1200 is NOT a term because its prime factors are {2, 2, 2, 2, 3, 5, 5} and 2^2 + 2^2 + 2^2 + 2^2 + 3^2 + 5^2 != 5^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[30000], !PrimeQ[#]&&sum[#]==2*lps[#]&] (* James C. McMahon, Jan 03 2026 *)
PROG
(PARI) is_a390574(n)={my(f=Vec(factor(n))); f[2][#f[2]]--; return(if(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 17 2025
STATUS
approved