login
A163836
Composites whose largest prime factor is equal to the sum of all the other prime factors (with repetition).
5
4, 9, 25, 30, 49, 70, 84, 121, 169, 286, 289, 308, 361, 440, 495, 528, 529, 594, 646, 728, 819, 841, 884, 961, 975, 1040, 1170, 1248, 1369, 1404, 1496, 1681, 1683, 1748, 1798, 1849, 1976, 2209, 2223, 2499, 2809, 2975, 3128, 3135, 3344, 3481, 3519, 3526, 3570
OFFSET
1,1
COMMENTS
Sequence contains the square of every prime. - Sean A. Irvine, Oct 05 2009
Contains 4*A143206. - David A. Corneth, Apr 28 2020
Contains 2*A037074. - Bernard Schott, Apr 28 2020
LINKS
EXAMPLE
a(1) = 4 (2=2), a(2) = 9 (3=3), a(3) = 25 (5=5), a(4) = 30 (5=3+2), a(5) = 49 (7=7), a(6) = 70 (7=5+2), a(7) = 84 (7=3+2+2), a(8) = 121 (11=11), a(9) = 169 (13=13), a(10) = 286 (13=11+2), a(11) = 289(17=17), a(12) = 308 (11=7+2+2), ...
MAPLE
A002808 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then return a; end if; end do: end if; end proc: A006530 := proc(n) if n = 1 then 1; else numtheory[factorset](n) ; max(op(%)) ; end if; end: A001414 := proc(n) ifactors(n)[2] ; add( op(1, p)*op(2, p), p=%) ; end: A163836 := proc(n) option remember; local a, lpf; if n =1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then lpf := A006530(a) ; if 2*lpf = A001414(a) then return a; end if; end if; od: end if; end: seq(A163836(n), n=1..80) ; # R. J. Mathar, Oct 10 2009
MATHEMATICA
seqQ[n_] := Module[{f = FactorInteger[n]}, If[Length[f] == 1, f[[1, 2]] == 2, f[[-1, 2]] == 1 && f[[-1, 1]] == Plus @@ Times @@@ Most[f]]]; Select[Range[4000], seqQ] (* Amiram Eldar, Apr 28 2020 *)
PROG
(Python)
from sympy import factorint
def ok(n):
f = factorint(n)
return sum(f[p] for p in f) > 1 and 2*max(f) == sum(p*f[p] for p in f)
print(list(filter(ok, range(3571)))) # Michael S. Branicky, Apr 09 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected and extended by Sean A. Irvine and R. J. Mathar, Oct 05 2009
STATUS
approved