login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A213020
Smallest number k such that the sum of prime factors of k (counted with multiplicity) is n times a prime.
2
2, 4, 8, 15, 21, 35, 33, 39, 65, 51, 57, 95, 69, 115, 86, 87, 93, 155, 212, 111, 122, 123, 129, 215, 141, 235, 158, 159, 265, 371, 177, 183, 194, 427, 201, 335, 213, 219, 365, 511, 237, 395, 249, 415, 446, 267, 278, 623, 964, 291, 302, 303, 309, 515, 321, 327
OFFSET
1,1
COMMENTS
Smallest k such that sopfr(k) = n*p, p prime.
LINKS
EXAMPLE
a(19) = 212 because 212 = 2^2 * 53 => sum of prime factors = 2*2+53 = 57 = 19*3 where 3 is prime.
MAPLE
sopfr:= proc(n) option remember;
add(i[1]*i[2], i=ifactors(n)[2])
end:
a:= proc(n) local k, p;
for k from 2 while irem (sopfr(k), n, 'p')>0 or
not isprime(p) do od; k
end:
seq (a(n), n=1..100); # Alois P. Heinz, Jun 03 2012
MATHEMATICA
sopfr[n_] := Sum[Times @@ f, {f, FactorInteger[n]}];
a[n_] := For[k = 2, True, k++, If[PrimeQ[sopfr[k]/n], Return[k]]];
Array[a, 100] (* Jean-François Alcover, Nov 13 2020 *)
PROG
(PARI) sopfr(n) = my(f=factor(n)); sum(k=1, #f~, f[k, 1]*f[k, 2]); \\ A001414
isok(k, n) = my(dr = divrem(sopfr(k), n)); (dr[2]==0) && isprime(dr[1]);
a(n) = {my(k=2); while (!isok(k, n), k++); k; } \\ Michel Marcus, Nov 13 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jun 02 2012
STATUS
approved