# Tag Info

### Round towards zero

Python 3, 3 bytes int Try it online! Truncates the digits after the decimal point. NOTE: This is a trivial answer. Please take a look at the other answers ...
• 2,722

### Egyptian fraction representations of 1

Python 2, 42 bytes f=lambda n,x=1:1/n*[x]or[x+1]+f(n-1,x*-~x) Try it online! The key thing to observe is that ...
• 22.8k

### Round towards zero

Python 2, 3 bytes int Try it online!
• 9,767

### Half, Half Half, and, Half

Haskell, 25 bytes pred.until(<2)(/2).(+0.5) Try it online! Outputs decimals, one-indexed without the initial zero term. Adds 0.5 to the input, then halves ...
• 146k

### Rational Number RNG

JavaScript (ES6), 81 bytes Returns $p/q$ as [p,q]. ...
• 195k
Accepted

### Parse a Unicode vulgar fraction

Raku, 17 bytes {S!\⅟!1/!.EVAL} Try it online! Returns a rational number type. Raku actually natively supports unicode literals and operators, though it doesn't ...
• 47.4k

• 35.9k
Accepted

### Infinitely Print Zeno's Dichotomy Paradox (1/(2^n))

05AB1E, 10 9 bytes Saved 1 byte thanks to Erik the Outgolfer [No…+1/J? Try it online! Explanation ...
• 53k

### Round towards zero

Perl 5 -p056l15, 2 bytes <> Try it online! How does that work? ...
• 15.7k
Accepted

### Round towards zero

Jelly, 1 byte r A full program (as a monadic Link it returns a list of length one). Try it online! How? ...
• 109k

### Phony fractions

J, 22 bytes %&".e.=/#&,%/&(1".\.]) Try it online! quick explanation for now: take the input as strings ...
• 33.7k

### Repetend length in 1/n

Jelly, 6 bytes R⁵*%i1 Try it online! Basically compute 10**[1..n] % n and get the 1-based index of ...
• 78.2k

### Quoted rational numbers

J, 25 bytes (%-.)~/@(10^#&>)#.10#.&>] Try it online! Takes a boxed 2-item vector containing the digit vectors of $x$ and $y$, and returns a ...
• 78.2k

### Simplify a continued fraction

LabVIEW, 36 equivalent bytes Fairly straight forward naive implementation using OP's algorithm. Is there a nicer way to do this?

### Is it within the Cantor set?

Mathematica, 54 bytes If[Last@#===1,Most@#,#]&@RealDigits[#,3][[1]]~FreeQ~1& Unnamed function taking a fraction x/y ...
• 15.9k

### Infinitely Print Zeno's Dichotomy Paradox (1/(2^n))

Python 2, 30 bytes -5 thanks to Erik the Outgolfer i=1 while 1:print i,'+1/';i*=2 Try it online!
• 2,421

### I want my book to be away from this table

Octave, 41 40 33 bytes 1 byte saved thanks to @Dennis @(n)find(cumsum(.5./(1:9^n))>n,1) Try it online! Explanation This uses the fact that harmonic numbers can ...
• 105k

### Ryley's Theorem

PARI/GP, 35 bytes r->[x=r+1/3,-x+r/3/d=x^2-r,1/9/d-1] Attempt This Online! PARI/GP, 40 bytes ...
• 49.3k

### Iterate your way to a fraction

Python, 54 bytes (-1 @Jonathan Allan, -1 me) f=lambda n,d:n and'gf'[p:=n*d>0]+f(p*n-d,[n,d][p])or'' Attempt This Online! Old Python, 56 bytes (@tsh) f=lambda n,d:n*d<0and'g&#...
• 16.7k

### Egyptian fraction representations of 1

Vyxal, 10 bytes ¡ɾṗ'Ė∑1=;t Try it Online! Bruteforcer. $O\left(2^{n!}\right)$ time complexity, searches for fractions with reciprocals $n!$ which seems to be ...
• 510

### Infinite Candle Sequence

Python, 31 bytes f=lambda a:a and(f(a//2)+a%2)/2 Attempt This Online! Returns the nth term (0-based) as a float. Python, 54 bytes a=b=0 while[print(int(bin(a)[:1:-1],2)/-~b)]:a+=1;b|=a Attempt This ...
• 16.7k

### Find Index of Rational Number in Calkin-Wilf Sequence

PARI/GP, 29 bytes f(x)=if(x,1+f(-1\-x*2-1-1/x)) Attempt This Online! \begin{align}f(0)&=0\\f(x)&=1+f(2\lceil1/x\rceil-1-1/x)\end{align}
• 49.3k

### Delete the first periodic digit

Wolfram Language (Mathematica), 59 bytes FromDigits@MapAt[RotateLeft@*List@@#&,RealDigits@#,{1,-1}]& Try it online! Explanation ...
• 13.8k