OFFSET
1,1
COMMENTS
k == 0 (mod 6). - Robert G. Wilson v, Apr 28 2018
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..2000
EXAMPLE
12 is a term because it is a multiple of the sum of digits of 11, 12 and 13: 2, 3 and 4.
MAPLE
s1:=convert(select(n->frac(n/convert(convert(n-1, base, 10), `+`))=0, [$2..31000]), set):
s2:=convert(select(n->frac(n/convert(convert(n, base, 10), `+`))=0, [$2..31000]), set):
s3:=convert(select(n->frac(n/convert(convert(n+1, base, 10), `+`))=0, [$2..31000]), set):
a:=convert(`intersect`(s1, s2, s3), list);
MATHEMATICA
f[n_] := Plus @@ IntegerDigits@n; fQ[n_] := Mod[n, {f[n - 1], f[n], f[n + 1]}] == {0, 0, 0}; Select[ 6 Range@5355, fQ] (* Robert G. Wilson v, Apr 28 2018 *)
PROG
(GAP) a:=Intersection(List([-1, 0, 1], t->List(Filtered(List([2..8000], m->[m, List(List(List([1..m], n->n-t), ListOfDigits), Sum)[m]]), i->i[1] mod i[2]=0), j->j[1])));
(Magma) [n: n in [1..31000] | n mod &+Intseq(n+1) eq 0 and n mod &+Intseq(n-1) eq 0 and n mod &+Intseq(n) eq 0]; // Vincenzo Librandi, Apr 29 2018
(PARI) isok(n) = (n>1) && !(n % sumdigits(n-1)) && !(n % sumdigits(n)) && !(n % sumdigits(n+1)); \\ Michel Marcus, Apr 29 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Muniru A Asiru, Apr 17 2018
STATUS
approved