OFFSET
1,1
COMMENTS
The function s_p(m) gives the sum of the base-p digits of m.
m must have at least 2 prime factors, since s_p(p^k) = 1 < p.
The sequence contains the primary Carmichael numbers A324316.
The main entry for this sequence is A324456 = numbers m > 1 such that there exists a divisor d > 1 of m with s_d(m) = d. It appears that d is usually prime: compare the sparser sequence A324858 = numbers m > 1 such that there exists a composite divisor c of m with s_c(m) = c. However, d is usually composite for higher values of m.
The sequence contains the 3-Carmichael numbers A087788, but not all Carmichael numbers A002997. This is a nontrivial fact. The smallest Carmichael number that is not a member is 173085121 = 11*31*53*61*157. For further properties of the terms see A324456 and Kellner 2019. - Bernd C. Kellner, Apr 02 2019
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Bernd C. Kellner, On primary Carmichael numbers, Integers 22 (2022), Article #A38, 39 pp.; arXiv:1902.11283 [math.NT], 2019.
EXAMPLE
s_p(m) = 1 < p for m = 2, 3, 4, 5 with prime p dividing m, but if m = 6 and p = 2 then s_p(m) = s_2(2 + 2^2) = 1 + 1 = 2 = p, so a(1) = 6.
MAPLE
S:= (p, m) -> convert(convert(m, base, p), `+`):
filter:= proc(m) ormap(p -> S(p, m) = p, numtheory:-factorset(m)) end proc:
select(filter, [$2..500]); # Robert Israel, Mar 20 2019
MATHEMATICA
s[n_, b_] := If[n < 1 || b < 2, 0, Plus @@ IntegerDigits[n, b]];
f[n_] := AnyTrue[Divisors[n], PrimeQ[#] && s[n, #] == # &];
Select[Range[400], f[#] &]n (* simplified by Bernd C. Kellner, Apr 02 2019 *)
PROG
(PARI) isok(n) = {if (n>1, my(vp=factor(n)[, 1]); for (k=1, #vp, if (sumdigits(n, vp[k]) == vp[k], return (1)))); } \\ Michel Marcus, Mar 19 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jonathan Sondow, Mar 17 2019
STATUS
approved