A288814 a(n) is the smallest composite number whose prime divisors (with multiplicity) sum to n.
4, 6, 8, 10, 15, 14, 21, 28, 35, 22, 33, 26, 39, 52, 65, 34, 51, 38, 57, 76, 95, 46, 69, 92, 115, 184, 161, 58, 87, 62, 93, 124, 155, 248, 217, 74, 111, 148, 185, 82, 123, 86, 129, 172, 215, 94, 141, 188, 235, 376, 329, 106, 159, 212, 265, 424, 371, 118, 177, 122, 183, 244, 305, 488, 427, 134, 201, 268, 335, 142
Offset: 4
Keywords
Examples
a(5) = 6 = 2*3 is the smallest composite number whose prime divisors add to 5. a(7) = 10 = 2*5 is the smallest composite number whose prime divisors add to 7. 12 = 2 * 2 * 3 is not in the sequence, since the sum of its prime divisors is 7, a value already obtained by the lesser 10. - _David A. Corneth_, Jun 22 2017
Links
- David A. Corneth, Table of n, a(n) for n = 4..10003 (terms 4..1000 from Michel Marcus)
- David A. Corneth, PARI program
Programs
-
Maple
N:= 100: # to get a(4)..a(N) V:= Array(4..N): count:= 0: for k from 4 while count < N-3 do if isprime(k) then next fi; s:= add(t[1]*t[2], t = ifactors(k)[2]); if s <= N and V[s]=0 then V[s]:= k; count:= count+1; fi od: convert(V,list); # Robert Israel, Feb 26 2018 # alternative A288814 := proc(n) local k ; for k from 1 do if not isprime(k) and A001414(k) = n then return k ; end if; end do: end proc: seq(A288814(n),n=4..80) ; # R. J. Mathar, Apr 15 2024
-
Mathematica
Function[s, Table[FirstPosition[s, ?(# == n &)][[1]], {n, 4, 73}]]@ Table[Boole[CompositeQ@ n] Total@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger[n]], {n, 10^3}] (* _Michael De Vlieger, Jun 19 2017 *) f[n_] := If[ PrimeQ@ n, 0, spf = Plus @@ Flatten[ Table[#1, {#2}] & @@@ FactorInteger@ n]]; t[] := 0; k = 1; While[k < 500, If[ t[f[k]] == 0, t[f[k]] = k]; k++]; t@# & /@ Range[4, 73] (* _Robert G. Wilson v, Feb 26 2018 *)
-
PARI
isok(k, n) = my(f=factor(k)); sum(j=1, #f~, f[j,1]*f[j,2]) == n; a(n) = forcomposite(k=1,, if (isok(k, n), return(k))); \\ Michel Marcus, Jun 21 2017
-
PARI
lista(n) = {my(res = vector(n), s, todo); if(n < 4, return([]), todo = n-3); forcomposite(k=4, , f=factor(k); s = sum(j=1, #f~, f[j, 1]*f[j, 2]); if(s<=n, if(res[s]==0, res[s]=k; todo--; if(todo==0, return(vector(n-3, i, res[i+3]))))))} \\ David A. Corneth, Jun 21 2017
-
PARI
See PARI-link \\ David A. Corneth, Mar 23 2018
Comments