10 votes

Numbers with distinct decimal digits

Haskell, 37 bytes import Data.List nub$nub.show<$>[1..] Try it online! Takes each number, removes duplicate digits from its string representation while ...
xnor's user avatar
  • 144k
6 votes

Numbers with distinct decimal digits

J, 14 bytes ~.~.@":&>i.!14 Attempt This Online! (with 7 instead of 14) Uses xnor's idea: take unique digits from each number and then take unique ...
Bubbler's user avatar
  • 72.8k
5 votes

Numbers with distinct decimal digits

05AB1E, 5 4 bytes ∞€ÙÙ Outputs an infinite list. Try it online. Explanation: ...
Kevin Cruijssen's user avatar
4 votes

Numbers with distinct decimal digits

K (ngn/k), 12 bytes .'??'$!_1e10 Try it online! (with 1e3 instead of 1e10) Uses xnor's idea: take unique digits from each number and then take unique results of ...
Bubbler's user avatar
  • 72.8k
3 votes

Numbers with distinct decimal digits

Nekomata, 3 bytes ŇƊů Attempt This Online! Outputs a list of lists of digits, without leading zeros. Zero is also output in this way (so appears in the output as ...
Dominic van Essen's user avatar
3 votes

Numbers with distinct decimal digits

JavaScript (SpiderMonkey), 43 bytes for(i=99e9;i;)/(.).*\1/.test(--i)||print(i) Try it online! (Linked version prints only up to 3 digits to avoid time out)
tsh's user avatar
  • 33.6k
3 votes

Numbers with distinct decimal digits

Python 3, 49 bytes n=1 while 1/n:10**len({*str(n)})>n!=print(n);n+=1 Try it online! Uses my 10** trick from 2014. ...
xnor's user avatar
  • 144k
3 votes

Numbers with distinct decimal digits

Vyxal, 26 bitsv2, 3.25 bytes Þ∞'Þu Outputs an infinite list. Try it online. Explanation: ...
Kevin Cruijssen's user avatar
2 votes

Numbers with distinct decimal digits

Retina 0.8.2, 27 bytes 9999999999$*¶ $.` A`(.).*\1 Try it online! Link only goes to 9876 because it would be too slow or run ...
Neil's user avatar
  • 163k
2 votes

Numbers with distinct decimal digits

Charcoal, 14 bytes ΦI…⁰Xχχ¬⊙ι⊖№ιλ Try it online! Link is to verbose version of code but only goes to 9876 because it would be ...
Neil's user avatar
  • 163k
2 votes

Numbers with distinct decimal digits

Brachylog, 3 bytes ℕ≜≠ Try it online! This is a generator, the output of this predicate unifies with each possible integer in increasing magnitudes. The try it ...
Fatalize's user avatar
  • 38.3k
2 votes

Numbers with distinct decimal digits

Ruby, 29 30 bytes p (?0..?9*10).grep_v /(.).*\1/ Try it online!
G B's user avatar
  • 20.8k
2 votes

Numbers with distinct decimal digits

Julia, 45 bytes (r=1:2^34)[allunique.(r.|>x->"$x")].|>println Attempt This Online! Any number larger than 10^10 is a suitable upper limit for ...
Ashlin Harris's user avatar
1 vote

Numbers with distinct decimal digits

Jelly, 7 bytes ȷ10Q€ḌQ Try it online! A niladic link returning the full list of numbers. TIO link only returns values <1e5 since otherwise it runs out of memory ...
Nick Kennedy's user avatar
1 vote

Numbers with distinct decimal digits

Bash, 34 seq -f%.0f 1e10|grep -Ev '(.).*\1' If you have the jot command installed, you can save 1 byte by replacing the seq ...
Digital Trauma's user avatar
1 vote

Numbers with distinct decimal digits

Ruby, 47 bytes f=->a=[*?1..?9],s=""{a.map{|i|f[a-[i],p(s+i)]}} Try it online! Link is a demo with only the digits ...
Level River St's user avatar
1 vote

First odd then even indices

Haskell, 77 bytes o(x:s)=x:e s o _=[] e=o.drop 1 a!b|a==b=1|0<1=1+a!(o b++e b) f a=a!(o a++e a) Try it online!
MegaTom's user avatar
  • 4,256

Only top scored, non community-wiki answers of a minimum length are eligible