OFFSET
0,5
COMMENTS
a(n) >= 1 for n >= 2 ?.
For n <= 200000, a(n) = 1 only for n = 2, 3, 299, (2 = 1 + 1, 3 = 1 + 2, 299 = 1 + 288) and a(n) = 2 only for n in {4, 5, 35, 59, 79, 95, 97, 149, 169, 179, 389}.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
EXAMPLE
MATHEMATICA
m = 100; nivens = Select[Range[m], Divisible[#, Plus @@ IntegerDigits[#]] &]; a[n_] := Length[IntegerPartitions[n, {2}, nivens]]; Array[a, m, 0] (* Amiram Eldar, Sep 27 2020 *)
PROG
(Magma) niven:=func<n | n mod &+Intseq(n) eq 0>; [#RestrictedPartitions(n, 2, {k: k in [1..n-1] | niven(k)}): n in [0..100]];
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marius A. Burtea, Sep 26 2020
STATUS
approved