|
|
A352439
|
|
Numbers k whose decimal expansion ends in the sum of the first two digits of k.
|
|
2
|
|
|
101, 112, 123, 134, 145, 156, 167, 178, 189, 202, 213, 224, 235, 246, 257, 268, 279, 303, 314, 325, 336, 347, 358, 369, 404, 415, 426, 437, 448, 459, 505, 516, 527, 538, 549, 606, 617, 628, 639, 707, 718, 729, 808, 819, 909, 910, 1001, 1011, 1021, 1031, 1041, 1051, 1061, 1071, 1081, 1091, 1102, 1112, 1122, 1132
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
101 is a term because "101" ends in "1" = 1 + 0;
112 is a term because "112" ends in "2" = 1 + 1;
1132 is a term because "1132" ends in "2" = 1 + 1; etc.
|
|
MATHEMATICA
|
q[n_] := Module[{d = IntegerDigits[n], s, ds, nds}, s = Plus @@ d[[1 ;; 2]]; ds = IntegerDigits[s]; nds = Length[ds]; ds == d[[-nds ;; -1]]]; Select[Range[10, 1140], q] (* Amiram Eldar, Mar 16 2022 *)
Select[Range[100, 1200], Total[Take[IntegerDigits[#], 2]]==Mod[#, 10]||Total[Take[IntegerDigits[#], 2]]==Mod[#, 100]&] (* Harvey P. Dale, Mar 29 2024 *)
|
|
PROG
|
(Python)
def ok(n):
s = str(n)
return n > 9 and s.endswith(str(int(s[0])+int(s[1])))
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|