OFFSET
1,2
COMMENTS
Numbers k such that k minus the sum of the squares of its prime factors with multiplicity is a square.
Is there any number other than 1 in both this sequence and A386257?
Contains no semiprimes.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 75 is a term because 75 = 3 * 5^2 and 75 - 3^2 - 2 * 5^2 = 16 = 4^2 is a square.
MAPLE
filter:= proc(n) local t;
issqr(n - add(t[1]^2*t[2], t=ifactors(n)[2]))
end proc:
select(filter, [$1..10^5]);
MATHEMATICA
spf[{p_, e_}]:=e*p^2; Q[k_]:=IntegerQ[Sqrt[k-Total[spf/@FactorInteger[k]]]]; Select[Range[29000], Q[#]&] (* James C. McMahon, Jul 23 2025 *)
PROG
(PARI) isok(k) = my(f=factor(k)); issquare(k - sum(i=1, #f~, f[i, 1]^2*f[i, 2])); \\ Michel Marcus, Jul 20 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Will Gosnell and Robert Israel, Jul 17 2025
STATUS
approved
