|
|
A292514
|
|
A number N is called a "rebel" number if there do not exist two integers a and b such that N = a + b with a > b > 0 and S(a) = S(b) where S(n) is the sum of the digits of the number n.
|
|
1
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 29, 38, 40, 49, 58, 60, 69, 78, 80, 89, 98, 100, 199, 399, 599, 799, 999, 2999, 4999, 6999, 8999, 19999, 39999, 59999, 79999, 99999, 299999, 499999, 699999, 899999, 1999999, 3999999, 5999999, 7999999, 9999999
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
A number which is not a "rebel" is called "docile". These definitions come from the French site Diophante, see link.
There are an infinite number of odd "rebel" numbers. For instance, all the repdigits 9999999...99 with a string of (2k+1) times the digit 9; but there are only eighteen even "rebel" numbers: {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 38, 40, 58, 60, 78, 80, 98, 100}.
|
|
LINKS
|
|
|
EXAMPLE
|
14 is rebel because 14 = 13 + 1 = 12 + 2 = 11 + 3 = 10 + 4 = 9 + 5 = 8 + 6 and never S(a) = S(b) with these integers.
|
|
MATHEMATICA
|
Select[Range@ 100, Count[IntegerPartitions[#, {2}], _?(And[#1 > #2, Total@ IntegerDigits@ #1 == Total@ IntegerDigits@ #2] & @@ # &)] == 0 &]~Join~Union@ Flatten@ Table[Map[FromDigits[{#}~Join~ConstantArray[9, k]] &, Range[1, 9, 2] - Boole[OddQ@ k]], {k, 2, 6}] (* 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 (0)); ); return (1); } \\ Michel Marcus, Sep 18 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|