Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
|||
function z = isSelfDescribing(n)
|
||||
s = int2str(n)-'0'; % convert to vector of digits
|
||||
y = hist(s,0:9);
|
||||
z = all(y(1:length(s))==s);
|
||||
end;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
for k = 1:1e10,
|
||||
if isSelfDescribing(k),
|
||||
printf('%i\n',k);
|
||||
end
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue