OFFSET
1,1
COMMENTS
LINKS
Giovanni Resta, Self or Colombian number, Numbers Aplenty.
EXAMPLE
7 is a term because there are not k < 7 such that 7 = k + sum of digits of k, and that are not q such that 7 = q * product of digits of q.
13 is not of the form q * product of digits of q for any q <= 13, so 13 is not a Bogotá number, but 13 = 11 + (1+1) is not Colombian, hence 13 is not a term.
42 is Colombian because there does not exist m < 42 such that 42 = m + sum of digits of m, but as 42 = 21 * (2*1) is a Bogota number, 42 is not a term.
MATHEMATICA
m = 600; Intersection[Complement[Range[m], Select[Union[Table[n + Plus @@ IntegerDigits[n], {n, 1, m}]], # <= m &]], Complement[Range[m], Select[Union[Table[n * Times @@ IntegerDigits[n], {n, 1, m}]], # <= m &]]] (* Amiram Eldar, Aug 26 2020 *)
PROG
(PARI) lista(nn) = Vec(setintersect(setminus([1..nn], Set(vector(nn, k, k+sumdigits(k)))), setminus([1..nn], Set(vector(nn, k, k*vecprod(digits(k))))))); \\ Michel Marcus, Aug 26 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Aug 26 2020
STATUS
approved