[go: up one dir, main page]

login
A261874
Numbers n such that the sum of digits of n is divisible by at least one prime divisor of n.
1
2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 18, 20, 21, 22, 24, 26, 27, 28, 30, 33, 36, 39, 40, 42, 44, 45, 46, 48, 50, 51, 54, 55, 57, 60, 62, 63, 64, 66, 68, 69, 70, 72, 75, 77, 78, 80, 81, 82, 84, 86, 87, 88, 90, 93, 96, 99, 102, 105, 108, 110, 111, 112, 114, 116, 117
OFFSET
1,1
COMMENTS
Sequence is infinite since it contains all positive multiples of 3. - Michel Marcus, Sep 04 2015
n such that gcd(n, A007953(n)) > 1. - Robert Israel, Sep 04 2015
LINKS
EXAMPLE
The sum of digits of 15 is 6, and 6 is divisible by 3, a divisors of 15.
MAPLE
select(t -> igcd(t, convert(convert(t, base, 10), `+`)) > 1, [$1..1000]); # Robert Israel, Sep 04 2015
MATHEMATICA
fQ[n_] := AnyTrue[First /@ FactorInteger@ n, Divisible[Total@ IntegerDigits@ n, #] &]; Select[Range@ 120, fQ] // Rest (* Michael De Vlieger, Sep 04 2015, Version 10 *)
PROG
(PARI) isok(n) = {sd = sumdigits(n); fordiv(n, d, if (d > 1, if (! (sd % d), return (1))); ); } \\ Michel Marcus, Sep 04 2015
CROSSREFS
Cf. A007953.
Sequence in context: A322002 A107743 A116066 * A334929 A008816 A002271
KEYWORD
nonn,base,easy
AUTHOR
Giovanni Teofilatto, Sep 04 2015
EXTENSIONS
More terms from Michel Marcus, Sep 04 2015
STATUS
approved