login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A255966
Numbers n such that each decimal digit of n is equal to the difference of at least two other digits of n.
4
101, 110, 202, 220, 303, 330, 404, 440, 505, 550, 606, 660, 707, 770, 808, 880, 909, 990, 1001, 1010, 1011, 1100, 1101, 1110, 2002, 2020, 2022, 2200, 2202, 2220, 3003, 3030, 3033, 3300, 3303, 3330, 4004, 4040, 4044, 4400, 4404, 4440, 5005, 5050, 5055, 5500
OFFSET
1,1
COMMENTS
Let x(1)x(2)... x(q-1)x(q) denote the decimal expansion of a number n. The sequence lists the numbers n such that, for all index i, x(i) = x(j) - x(k) for some index j and k.
The sequence is infinite because a(n)*10^m for all integers m is also in the sequence.
All numbers of the sequence contain at least two identical decimal digits. a(n) contains at least one decimal digit equal to zero. The number
12345678909 is the smallest element of the sequence containing 10 distinct digits.
The prime numbers of the sequence are 101, 10111, 10133, 10177,...
The squares of the sequence are 59049, 60516, 91809, 130321,...
LINKS
EXAMPLE
34707 is in the sequence because 3=7-4, 4=7-3,7=7-0 and 0=7-7.
MAPLE
with(numtheory):
for n from 100 to 10000 do:
x:=convert(n, base, 10):n1:=nops(x):c:=0:T:=array(1..n1-1):
for nn from 1 to n1 do:
z:=x[nn]:
k:=0:
for j from 1 to n1 do:
if nn<>j
then
k:=k+1:T[k]:=x[j]:
else
fi:
od:
ii:=0:
for a from 1 to n1-1 while(ii=0) do:
for b from a+1 to n1-1 while(ii=0) do:
if z=abs(T[a]-T[b]) then ii:=1:c:=c+1:
else
fi:
od:od:
od:
if c=n1 then printf(`%d, `, n):
else
fi:
od:
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Mar 12 2015
EXTENSIONS
Comments corrected by Harvey P. Dale, Oct 17 2021
STATUS
approved