OFFSET
1,1
COMMENTS
A number which is not "docile" is called a "rebel". These definitions come from the French site Diophante, see link.
There are an infinite number of odd docile numbers and also and infinite number of even docile numbers. For instance 10^n + 1 = 1000...00001 and S(10^n) = S(1) = 1, or, 2000...00002 = 2000...0000 + 2 and S(2000..000)= S(2) = 2.
What are the smallest integers which are 2 times, 3 times, ... docile numbers?
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Maurice Bauval, Dociles et Rebelles, Diophante, A 348, September 2014
EXAMPLE
15 is docile because 15 = 12 + 3 and S(12) = S(3) = 3.
16 is not docile because 16 = 15 + 1 = 14 + 2 = 13 + 3 = 12 + 4 = 11 + 5 = 10 + 6 = 9 + 7 and never S(a) = S(b) with these integers.
MAPLE
N:= 200: # for all terms <= N
A:= {}:
for x from 1 to N do
t:= convert(convert(x, base, 10), `+`);
if not assigned(S[t]) then S[t]:= {} fi;
A:= A union select(`<=`, map(`+`, S[t], x), N);
S[t]:= S[t] union {x};
od:
sort(convert(A, list)); # Robert Israel, Sep 23 2019
MATHEMATICA
Select[Range@ 101, Count[IntegerPartitions[#, {2}], _?(And[#1 > #2, Total@ IntegerDigits@ #1 == Total@ IntegerDigits@ #2] & @@ # &)] > 0 &] (* Michael De Vlieger, Sep 18 2017 *)
PROG
(PARI) isok(n) = for (x=1, n\2, if ((x != (n-x)) && (sumdigits(x) == sumdigits(n-x)), return (1)); ); return (0); \\ Michel Marcus, Sep 18 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Sep 18 2017
STATUS
approved