# Tag Info

• 159
1 vote

### Display numbers lacking 2's

><>, 40 33 bytes 0v o>1+:::a%:2=@-a,2=+?!n:b9*)?;0 Try it online! Or watch the execution in real time with this interpreter All the numbers are output, ...
• 23.4k

### Generate a subgroup of a free group

Jelly, 18 17 bytes UN;ƊL⁹ḃịƲF;Ṗ+Ṫ¥?/ Try it online! -1 thanks to Jonathan Allan Takes the words as positive and negative integers on the left, and a 1-index on the ...
• 21.5k

### Display numbers lacking 2's

Scratch 3, 10 blocks / 97 bytes Try it online! ScratchBlocks Syntax ...
• 33.6k
1 vote

### Display numbers lacking 2's

Uiua SBCS, 20 bytes ≡&p▽∵◇/↧⊸≠@2°⋕+1⇡100 Try it! Explanation ...
• 24.6k

### Generate a subgroup of a free group

Charcoal, 54 bytes ⊞υωＷＳ«⊞υι⊞υ⭆⮌ι⎇№ακ↧κ↥κ»≔⍘ＮυθＷΦＥ⪫υω⁺κ⎇№ακ↧κ↥κ№θκ≔⁻θ⌊ιθθ Try it online! Link is to verbose version of code. Takes a newline-terminated list of ...
• 172k

### Smallest Harmonic number greater than N

Octave, 34 bytes f=@(n)find(cumsum(1./(1:4^n))>n,1) Try it Online! Explanation Vectorization + cumulative sum. Can evaluate ...
• 181

### Generate a subgroup of a free group

Pyth, 25 bytes #jmu?s>2K+GHKPGsdYy=+m__M Try it online! Words are lists of non-zero integers where inversing is done by negation. Generates output infinitely ...
• 4,467

### Smallest Harmonic number greater than N

Python 3, 34 bytes f=lambda n,k=2:n<1or-~f(n-1/k,k+1) A recursive function that accepts $n$ (0-indexed) and returns the required number of terms. Try it ...
• 107k

### Smallest Harmonic number greater than N

Ruby, 28 27 bytes ->n{(1..).find{0>n-=1r/_1}} Attempt This Online!
• 22.1k

### Generate a subgroup of a free group

Jelly,  24  23 bytes FµŻSƝaSƝTị UN;ƊṗⱮẎÇÐL€ḣ A dyadic Link that accepts the list of words on the left, and a non-negative integer, $n$, on the right and yields a ...
• 107k

### Smallest Harmonic number greater than N

R, 36 bytes \(n){k=0;while(F<=n)F=F+1/(k=k+1);k} Try it online! Minus 2 bytes thanks to @pajonk's suggestion in comment.
• 231

### Smallest Harmonic number greater than N

Desmos, 43 bytes f(n)=g(n,1) g(n,k)=\{n<0:0,g(n-1/k,k+1)+1\} Port of xnor's Python answer. Try It On Desmos! Try It On Desmos! - Prettified
• 13.6k

### Smallest Harmonic number greater than N

05AB1E, 7 bytes ∞.ΔLzO‹ Given a 0-based $n$, outputs the $n^{th}$ value. Try it online or verify the infinite list. Explanation: ...
• 127k
1 vote

### Output the missing integer

R, 31 bytes \(S)(0:9)[!mapply(grepl,0:9,S)] Attempt This Online! I think it's very easy: the range 0..9 is subset by a ...

### Smallest Harmonic number greater than N

Brachylog, 11 bytes ≤.⟦₁/₁ᵐ+>?∧ Try it online! Takes n as input. Explanation ...
• 38.9k

### Smallest Harmonic number greater than N

Wolfram Language (Mathematica), 43 bytes Ceiling@*InverseFunction[HarmonicNumber]@*N Try it online! (for some reason TIO returns ...
• 15.8k

### Smallest Harmonic number greater than N

Google Sheets, 57 bytes Expects $n$ in A1 ($0$-indexed) =LET(R,LAMBDA(R,s,i,IF(s>A1,i-1,R(R,s+1/i,i+1))),R(R,,1)) Reaches calc limit starting from $n=10$ (...
• 751

• 3,118

### Smallest Harmonic number greater than N

Jelly, 7 bytes İ€S>ð1# A monadic Link that accepts a non-negative integer and yields a singleton list containing a positive integer. Or a full program that ...
• 107k

### Smallest Harmonic number greater than N

Arturo, 41 bytes g:$[n k][(n<1)?->k->g n-1//<=k+1]$=>[g&1] Try it! A port of Arnauld's JavaScript answer. Arturo doesn't have default arguments, ...
• 24.6k

### Smallest Harmonic number greater than N

Python 3, 36 bytes f=lambda n,k=1:n>=0and-~f(n-1/k,k+1) Try it online! Outputs zero-indexed, which is how the OEIS is defined. 43 bytes ...
• 145k

### Smallest Harmonic number greater than N

Python, 41 bytes f=lambda n,k=0:n<1and k or f(n-1/-~k,-~k) A port of @Arnauld's answer. Attempt This Online!
• 5,532

### Smallest Harmonic number greater than N

Charcoal, 18 bytes ＮθＷ¬‹θ⁰«→≧⁻∕¹ⅈθ»Ｉⅈ Try it online! Based on @Arnauld's answer but I chose to make mine 0-indexed. Explanation:...
• 172k

### Smallest Harmonic number greater than N

Haskell, 31 bytes (0!) k!n|n<1=k|k<-1+k=k!(n-1/k) Ungolfed: ...
• 5,532

### Smallest Harmonic number greater than N

JavaScript (ES6), 29 bytes Returns the $n$-th term, 1-indexed. f=(n,k=0)=>n<1?k:f(n-1/++k,k) Try it online!
• 193k

### Smallest Harmonic number greater than N

Vyxal 3, 8 bytes λɾė∑⁰>}“ Try it Online! ...
• 842

### Output the inventory sequence

Python 3, 59 bytes i=0;a=[0]*99 while 1:print(n:=a[i]);a[n]+=1;i=[i+1,0][n==0] This is a mostly straightforward golfing of OP's program, with ...
• 6,571

### A bit of a digital XOR

R, 51 bytes \(n,+=\(b)n%/%b^rev(0:log(n,b))%%b)(+2*+10)[+2>0] Attempt This Online!
• 16.7k
1 vote

### A bit of a digital XOR

Pip, 11 bytes a@_X BMETBa Attempt This Online! Explanation ...
• 39.7k

### A bit of a digital XOR

R, 75 bytes \(x,b=bitwAnd(x,e<-2^((log(x,2)%/%1):0))/e)(utf8ToInt(c(x,""))-48+0*b)[!!b] Attempt This Online! A function which inputs a number $x$ ...

### Output the inventory sequence

Retina 0.8.2, 65 bytes .+ $*_ smr{1(^0((¶)|.)*?¶)?_$1$#3¶_ (((^\4$)|.)*)(\d+)¶_ $1$#3¶ Try it online! Outputs the first N ...
• 172k

• 10.8k

### Output the inventory sequence

PowerShell Core, 44 bytes for($s=@{}){($l=+$s.($i=++$i*!!$l)) $s.$l++} Try it online! Outputs the sequence indefinitely ...
• 3,118

### Output the inventory sequence

R, 56 52 bytes N={};repeat{show(x<-sum(F==N));N=c(N,x);F=(F+1)*!!x} Attempt This Online! R, 60 56 52 bytes -4 bytes thanks to the pajonk's suggestion ...