login
Triangular numbers n such that each decimal digit of n is equal to the difference of at least two other digits of n.
3

%I #12 Apr 01 2015 10:26:24

%S 990,3003,5050,10011,10878,13203,15051,28680,39903,41041,45150,64620,

%T 66066,81810,93096,107880,108811,145530,155403,165600,191890,203203,

%U 237705,322003,339900,404550,405450,414505,441330,468028,499500,500500,502503,504510

%N Triangular numbers n such that each decimal digit of n is equal to the difference of at least two other digits of n.

%C Proper subset of A255966. - _Michel Marcus_ , Mar 13, 2015.

%e 10878 is in this sequence since it is the 147th triangular number and 1 = 8-7, 0 = 8-8, 8 = 8-0, 7 = 8-1 and 8 = 8-0, where the eights are different digits.

%t fQ[n_] := Block[{id = IntegerDigits@ n, lng = 1 + Floor@ Log10@ n}, Union@ Table[c = Complement[ Range@ lng, {i}]; MemberQ[ Union@ Flatten@ Table[Abs[id[[j]] - id[[k]]], {j, c}, {k, c}], id[[i]]], {i, lng}] == {True}]; tri[n_] := n(n + 1)/2; Select[ tri@ Range@ 1050, fQ]

%Y Cf. A000217, A255892, A255893.

%K base,easy,nonn

%O 1,1

%A _Michel Lagneau_ and _Robert G. Wilson v_, Mar 11 2015