A193772 Nonnegative integers whose digital difference is 0.
0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 110, 202, 211, 220, 303, 312, 321, 330, 404, 413, 422, 431, 440, 505, 514, 523, 532, 541, 550, 606, 615, 624, 633, 642, 651, 660, 707, 716, 725, 734, 743, 752, 761, 770, 808, 817, 826, 835, 844, 853, 862, 871, 880
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
V:= proc(n,s) # n-digits numbers with sum of digits s option remember; local i,k; `union`(seq(seq(map(t -> i*10^(n-1) + t, procname(k,s-i)),k=1..n-1),i=1..min(s,9))) end proc: for s from 0 to 9 do V(1,s) := {s} od: f:= proc(n) local s,k; `union`(seq(seq(map(t -> s*10^(n-1) + t, V(k,s)), k=1..n-1),s=1..9)) end proc: sort(convert(`union`(seq(f(d),d=1..4)),list)); # Robert Israel, Nov 14 2024
-
Mathematica
fQ[n_] := Module[{d = IntegerDigits[n]}, d[[1]] == Total[Rest[d]]]; Select[Range[0, 1000], fQ] (* T. D. Noe, Jan 02 2013 *)
Formula
If decimal expansion of n is x1 x2 ... xk then x1 - x2 - ... - xk = 0.
Extensions
Definition edited by Michel Marcus, Oct 26 2014
Comments