OFFSET
1,1
COMMENTS
Conjecture: a(n) exists for all n > 0.
Many terms are numbers with two distinct prime divisors, exceptions being a(157) = 15465, a(254) = 25815, a(279) = 28695, a(303) = 31665, ... which have three prime distinct divisors, ...
LINKS
Michel Lagneau, Table of n, a(n) for n = 1..1000
EXAMPLE
a(5) = 26 because 26 = 2*13 => 26 mod (2+13) = 26 mod 15 = 11 = prime(5).
MATHEMATICA
Table[k=1; While[Mod[k, Plus@@First[Transpose[FactorInteger[k]]]]!=Prime[n], k++]; k, {n, 50}]
PROG
(PARI) spf(k) = my(f = factor(k)); vecsum(f[, 1]);
a(n) = {k=2; while (k % spf(k) != prime(n), k++); k; } \\ Michel Marcus, Oct 06 2015
(Python)
from sympy import prime, primefactors
def a(n):
k, target = 2, prime(n)
while k%sum(primefactors(k)) != target: k += 1
return k
print([a(n) for n in range(1, 53)]) # Michael S. Branicky, Dec 10 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Oct 05 2015
STATUS
approved