text:
Hack into a Lottery
You've recently made an account on a dodgy gambling site, where for a fee of 25 dollars, they will pay you back a random amount between 0 and 50 dollars. After getting around 5 dollars twice, you decide to prove the site is a scam. After accessing their external firewall with the default password, you find your way onto their database server, and find where the values for the minimum and maximum amounts are held. You decide to plug 25 '9's in as the maximum value, but get an error message saying the maximum value must be of type 'uint64'. However it is now that you notice some number keys don't seem to type into the remote console correctly. The challenge appears before you almost as if typed up on a Q+A site.
using only the conveniently installed programs for testing and executing your particular language, output the maximum size of an unsigned 64-bit integer value, however almost everything except the programming tools are broken on this machine, leaving you without the use of the numbers 1,2,4,6,8 - in either source code or literals, you also notice that it seems to take an exponentially longer amount of time to execute the program for each additional piece of code, so you'd better keep it short if you want to get rich before the drawing!

The Challenge

Write a program which outputs 18446744073709551615, the maximum value of an unsigned 64-bit integer, as either a number, or a single string.

Your source code cannot contain any of the characters '1','2','4','6' or '8'

if your language does not have an unsigned 64-bit integer or equivalent, the output can be in string format or otherwise, but must be the above number.

this is code-golf so shortest code in each language wins!

predefined values. pfft

can output be a hexadecimal number?

@user902383 must be in the exact format, feel free to parse it as a hex number, as long as the output is in normal decimal notation.

You don't need any constants, e.g. int x, y, z; y = x - x; z = factorial(y); at which point y == 0 and z == 1 from z you can get any number, including the real numbers. I've considered designing a language without digits: e.g. ONE = |{}|! (factorial of cardinality of empty set), then TWO = ONE + ONE, and so on.

What an odd challenge

I love the story lol. More challenges need a backstory like this

So now that there are many solutions to choose from, was the gambling site a fraud?

Relevant XKCD: https://xkcd.com/221/

Beeswax, 3 bytes
_M{

Explanation:
_   # Create a bee going horizontally across the line, reading the code
 M  # Decrement the bee's counter, which starts at 0.
    # This will set the counter to 2^64-1, because as bees don't have a concept of
    # negative numbers, all values that are negative are translated to 2^64-n,
    # and in this case, n = -1, as we are calculating 0 - 1.
  { # Print the value

Try it online!
This language is perfect for this challenge.
Here is an extract from the Esolang page on Beeswax:

As everyone knows, bees don’t have a concept of negative numbers, but they discovered that they can use the most significant bit of an address to get around that. Thus, coordinates relative to a bee’s position are realized by the two’s complements of the coordinates. This way, half of the 64-bit address space is available for local addressing without wraparound in each direction.
The maximum positive 64-bit two’s complement address is 9223372036854775807 or 0x7fffffffffffffff in 64 bit hex. All values from 0 up to this value translate identically to the same 64 bit value. All values n in the opposite (negative) direction translate to 2^64-n. For example: n=-1 is addressed by 18446744073709551615. n=-9223372036854775808 is addressed by 9223372036854775808.

This is basically unsigned longs.
EDIT: I'm still expecting Dennis to outgolf me with a 2-byte solution.

You don't need to print it if the form will return the value. See other answers.

There are two solutions with the same length. The other one is  _!{

C, 26 bytes
main(){printf("%lu",~0l);}

Prints a unsigned long value.
Requires the size of long to be 64 bits.

Nice one. Pretty much the same in Perl: print~0.

~0l should work.

Source code cannot contain the character '1'.

@AnixPasBesoin it's a lowercase 'L' :)

@Quentin ^^ Ah! Sorry! Didn't notice (was using mobile, "l" and "1" looked the same). This post has my upvote now.

You're assuming sizeof(long) * CHAR_BIT == 64.  A reasonable assumption for golf, but worth pointing out.

Why does this work? What is the behaviour of '~' followed by an integer?

@Chris it's the bitwise not operator.

64-bit SBCL Common Lisp, 18 bytes
most-positive-word
Most positive word on 64-bit compiler is 64uint. It's something.

Best syntax :))

Makes me very happy

CJam (4 bytes)
GG#(

Online demo
This calculates 1616 - 1 using builtin G for 16 and the decrement operator (.

Definitely GG! ;)

gg, Peter, gg..

Python3 REPL, 12 bytes
In REPL: ~-(~-3<<9*7)
Outside of REPL: print~-(~-3<<9*7) <--> Python2!
Here's another one at 17 bytes: ~-(~-3<<ord("?")).
Explanation
Nothing super fancy. Here's it broken down:
~-           | Subtract 1 from the next value.
  (          |
   ~-3       | Subtract 1 from 3, resulting in 2
      <<     | Binary shift 2's digits to left,
        9*7  | by 9*7 (63).
           ) | The value inside the parentheses is now 2**64.

The resulting expression is roughly (but not quite)  ~-(2<<63) -> (2**64)-1. I use the tadpole operator twice here. A golfing tip about it is here.
There is also sys.maxint in Python2 which can be used, but I won't be looking at that.
repl.it <- testing link.

Why does this code look like a cat that ate another cat?

bc, 15 13 bytes
Saved 2 bytes thanks to manatwork.
(a=9+7)^a-3/3

Nothing fancy, just (16^16)-1.

Welcome to PPCG!

(a=9+7)^a-3/3

Thanks I was originally doing something like that in bash before I realised my answer was better as pure bc.

dc, 7 bytes
I think it's allowed for stack based languages to leave the answer on the top cell of the stack, similar to a return value for functions. If explicit printing is needed, add p at the end of the code.
AZ5E^z-

Try it online!
It computes (2 64 - 1) using several tricks:

2 is given as the number of digits (Z) found in integer 10 (A)
64 is given as 5E. By default dc uses 10 as the input radix. Even so, it can accept numbers in hexadecimal notation, but they will be converted differently than you'd expect. Example:
(5E)default = (5E)(input radix = 10) = (5 * 10 1) + (14(E) * 10 0) = 50 + 14 = 64
1 is given as the stack's depth (z), since only (2 64) was present then

Alternative story:

However it is now that you notice some number keys don't seem to type
  into the remote console correctly. You take a deep breath and start
  testing each numerical key. It is worse than you thought! Not a single
  one works, and you're left with the task to produce your desired
  integer by using only letters and symbols.

Solution in dc: computing (16 16 - 1), still 7 bytes!
Fz+d^z-          # push 15, push 1, add, duplicate, exponentiate, push 1, subtract

Try it online!

Great alternative story

05AB1E, 4 bytes
žJn<

Explanation:
žJ   # Push 4294967296
  n  # Squared
   < # Decreased by one

Finally! A chance to use 05AB1E's builtins for powers of two!
Try it online!
Another 4 byte answer:
žxo<

Explanation:
  o  # 2 to the power of
žx   # 64
   < # Decreased by one

Try it online!
(if anyone is wondering, this question is older than all the other 4-byte answers)

I feel like there's a shorter solution along the lines of 64o< but I haven't found it yet. Something like '@Ço< with a creative 64 push... If you manage to push 64 with 1 byte, you can get 3 is the point I'm trying to make.

Jelly, 4 bytes
⁴*`’

Try it online!
Explanation
⁴     # 16
 *    # exponentiate
  `   # last link as a monad, repeating the argument
   ’  # decrement

MATLAB / Octave, 5 bytes
@Sanchises posted an excellent MATLAB answer, however this one is a considerably different approach, so I'll post it anyway:
tic/0

In MATLAB, tic returns the number of milliseconds past since the program was opened. Crucially the value it returns is a uint64 type. This gets away from having to cast a number to uint64 from MATLABs default type of double.
Any number divided by 0 in MATLAB is considered as infinity which for non-floating point types, MATLAB represents this as the maximum integer value for that type.

This also works with Octave though depending on which interpreter you use it may spit out a "division by zero" warning as well. You can try the code online here though as I say you get a /0 warning that doesn't appear in MATLAB.

Really clever approach, nice one.

I'm only seeing this answer now. Very clever! (of course, it does not work if you execute this on a very fast computer such that tic==0 at startup )

Java (JDK), 28 bytes
v->Long.toUnsignedString(~0)

Try it online!

Missing java "boilerplate" and system.out.print part

@ViktorMellgren This declares a lambda expression, which is perfectly fine.

This requires Java 8

Yes java 8 and up, no more boilerplate! Fear codegolfers! Java is a real contester now. This is the time you all were so scared about, all your codegolfing language are for nothing! Oh wait still 30 bytes,... hides

Why not just ()->~0L? The question allowed numeric output

@k_g in Java, longs are always signed, they're only treated as unsigned by certain static methods in the Long class. Returning ~0L numerically would be the smallest signed value, not the largest unsigned value (though they have the same representation).

@mbomb007 Java 8 is the latest supported version. When you mean Java now, it's Java 8 by default. Java 7 isn't supported anymore for wide audience. I'll keep naming my Java answers "Java".

I could have written ()->"18446744073709551615" for 26 bytes, but that's the boring answer and no one would have learned of the hidden Java 8's "unsigned" methods.

@OlivierGrégoire Same with Python 3, but if someone just puts "Python", it means it works in both 2 and 3. Since we have answers all over the site that use "Java" to mean "Java 7", it's better to include the version.

Python 2.7 is still supported, that's a big difference here.

Surely the "shorter solution" uses the illegal characters 1846.

Oh... didn't think about those restrictions. Gonna delete it.

Long.MAX_VALUE/0.5

@carusocomputing the value is then rounded: 1.8446744073709552E19 instead of 18446744073709551615.

bc, 18, 16 bytes

Saved 2 bytes, thx @MrScapegrace

(9-7)^(55+9)-3/3

can you use something like -3/3 to get -1?

@MrScapegrace, yep that's a nice idea, thank you !

@boboquack 55+9 = 64, not 63!

PHP, 16 bytes
This is much like the answer from Ven: https://codegolf.stackexchange.com/a/110751/38505
printf("%u",~0);

https://repl.it/Frcy/0

For this to work, you need to be in a 64-bit architecture. This is because ~0 is -1, which is 1111111111111111111111111111111111111111111111111111111111111111 in binary, in 64 bits, compared to 11111111111111111111111111111111 in 32-bits, and the numbers are plataform-dependent - Ismael Miguel

Lol. This works in bash too: printf %u $[~0].

Aha, nice @manatwork

This is architecture-dependent, it doesn't work on i386.

@pts Obviously! i386 is 16/32-bits. PHP is very picky about that. For this to work, you need to be in a 64-bit architecture. This is because ~0 is -1, which is 1111111111111111111111111111111111111111111111111111111111111111 in binary, in 64 bits, compared to 11111111111111111111111111111111 in 32-bits, and the numbers are plataform-dependent.

@ʰᵈˑYou're welcome. I must admit that I slacked a bit. I've copy-pasted 32 1's. If you want, you can fix your grammar a bit on your answer.

MATLAB / Octave, 22 bytes
eye(['~rw}?='-9 ''])/0

Try it online!
eye is used to create a unit matrix (matrix with 1  on the diagonal, zero otherwise). Without arguments, this creates a 1x1 unit matrix, or in other words, just a 1. It takes an optional argument, which is the data type ('class' in MATLAB terminology) of the created matrix. We thus ask for a 1 of class uint64 , and divide it by zero which results in Inf in MATLAB, which gets clipped at intmax('uint64').
The vector ['~rw}?='-9 ''] evaluates to 'uint64'. Concatenating an empty char to a vector is 1 byte shorter than using char('~rw}?='-9).
Reasoning towards this answer: the built-in intmax sadly evaluates to the maximum of a 32 bit signed integer. The obvious next option is uint64(), which contains the forbidden characters. The alternative is to use a function that takes a string as a data type. Obvious candidates are intmax and cast, but alternatives include zeros, ones and eye.
eye(['~rw}?='-9 ''])/0    % Winning version! 22 bytes.
intmax(['~rw}?='-9 ''])   % Obvious candidate. 23 bytes.
1/zeros(['~rw}?='-9 ''])  % 24 bytes
cast(Inf,['~rw}?='-9 '']) % 25 bytes. Also an obvious candidate, but actually very long.

Note: MATLAB is installed by default on virtually all dodgy gambling sites.

PowerShell, 29 14 bytes
0xC000PB/3-3/3

Try it online!
Thanks to @n0rd for essentially golfing this in half.
This leverages the inbuilt unary PB operator that basically functions as "multiply the preceding number by 1125899906842624" (i.e., how many bytes are in a pebibyte). That's coupled with the hex 0xC000, or 49152, so 49152 pebibytes. We divide that by 3, yielding 18446744073709551616, and subtract 3/3 to get the final value.

"0x$(7-3)000PB-9/9"|iex

0xC000PB/3-3/3

@n0rd Oh, that's dang clever, using PB like that. Thanks!

@n0rd pretty impressive, welcome to PPCG!

JavaScript, 39 38 33 32 bytes
alert(0xafebff0+'737095'+0xc99f)

Edit: Saved 5 bytes thanks to @Arnauld.

Remove alert as this can be run in a console.

BF, 108 bytes
-[----->+<]>--.+++++++.----..++.+.---..----.+++++++.----.++++.-------.+++++++++.----..----.+++++.-----.++++.

If each command is considered as 3 bits, this is potentially 41 bytes.

Each command is one byte. Not 3 bits.

Well yes, that's why I put it as 108 bytes...

Yeah, but you said "this is potentially 41 bytes", which it's not.

An interpreter could be made to interpret 3-bit groups as one of eight commands +-<>[].,

That already exists. It's called http://esolangs.org/wiki/Binaryfuck

Yes, but, the problem is still that the interpreter takes each value as 1 byte instead of 1 bit.

That's basically what Golunar is for. Sesos is similar.

Let us continue this discussion in chat.

Retina, 28 27 bytes
Saved 1 byte thanks to Kritixi Lithos

bieegheeahdhajffbgbf
T`l`d

Try it online!
Explanation

bieegheeahdhajffbgbf
Replaces the non-existent/empty input with this string. This particular string was generated by the "inverse" of this program. It encodes a through j as 0 through 9, respectively.
T`l`d

This is a Transliteration stage. The l and d are character sets used for transliteration. l represents the lowercase alphabet, d is all digits. So, it maps abcdefghij back to 0123456789.

https://tio.run/nexus/retina#@8/l5Onq6u7h6uro4eLh6OXm5uTu5MYVkuCTkPL/PwA is 1 byte shorter (I used d instead of EO)

@KritixiLithos Oh yeah. I'm still not fully awake :P

Brain-Flak, 64, 62, 58, 54 bytes
(((((()()()()){}){}){}){}){({}<(({}()){}[()])>[()])}{}

Try it online!
[Try it online!]
Four bytes saved thanks to @Riley!
Explanation:
#Push a 64
(((((()()()()){}){}){}){})

#While true
{

  #Pop the top of the stack. We'll store this value for later, but first
  ({}

  #Before pushing the value
  <

    #Push (N + 1) * 2 - 1
    # (where N is the number underneath, originally 0)
    (({}()){}[()])

  >

  #And push the TOS minus one back on
  [()])

#endwhile
}

#Pop the zero left over
{}

#And decrement the number underneath
({}[()])

For the record, I tried pushing 32 and quadrupling, but it's the same byte count.

You can save 4 bytes by using one of the ()s from 64 to push the 1: ((((((())()()()){}){}){}){})

@Riley Aha, of course! Thanks

56 bytes: ((((((())()()()){}){}){}){}[()]){({}<(({}){}())>[()])}{}

54 bytes:((((((<>)()()()()){}){}){}){}){({}<(({}){}())>[()])}{}

Um, can't you just do N*2+1 instead of (N+1)*2-1?

JavaScript (ES6), 50 bytes
[...'䠎ᴐIF╏ɧ'].map(s=>s.charCodeAt()).join``

You can change the characters to '䠎ᴐIF╏ɧ' and remove the -27

@jdp Nice one, thanks :)

'䠎ᴐIF╏ɧ'.replace(/./g,s=>s.charCodeAt()) seems to save 3 bytes; note that this appears to be a snippet rather than a function or program, but you could prefix _=> to turn it into a function.

C++, 46 bytes.
int m(){std::cout<<unsigned long long(5+3-9);}

First time ever doing a code golf, but I'm fairly happy with myself. Will happily take any critique/suggestions :)

Python3 REPL, 11 bytes
~0^~0>>~077

How it works

~0 is -1 (two's complement, an infinite sequence of '1's)
077 is 63 in octal, so ~077 is -64
Shift right with negative parameter is a shift to the left
Putting all together, -1 xor (-1 << 64) is the number we are looking for

C# 6, 31 bytes
()=>System.Console.Write(~0UL);

Pretty much the same as Java.
C# 5, 56 bytes
class P{static void Main(){System.Console.Write(~0UL);}}

The C# 6 answer is only an anonymous action, which are also present in C# 5.

Also the challenge only asks you to output the number so you could compile to a Func<ulong> as: ()=>~0UL;

It also doesn't say that you can't use any input so you could compile to a Func<int, ulong> to save a byte: _=>~0UL; and I think it would still be valid.

Forth (gforth), 11 9 7 bytes
true U.

Try it online
true is the same as -1. U. prints a number as an unsigned integer.
This works on TIO, possibly because it has a 64-bit architecture? I'm not sure. If I run -1 U. on repl.it, for example, I get 2**32-1. If repl.it supported double-length integers, outputting them would use UD. instead.

You can probably reduce this to -3 3 / U.

Or, even better: true U.  (which also rhythms nicely)

Oh, I forget about true, because I'm so used to using 0 and 1. Thanks.

R, 58 bytes
R has only 32-bit integers, and with 64-bit doubles, the number 18446744073709551615 is not accurately represented, hence this will return a string. I can't even use 64-bit integer packages, because many of them have 64 in the names. Probably not the right tool for the job.
x=as.character((9+7)^(9+7))
n=nchar(x)
substr(x,n,n)='5';x

computes 16^16 and replaces the last character with a 5.
Try it online!

MATL, 8 bytes
l_5Z%EZD

This could probably be improved, but I'm not familiar with strings and types in MATL just yet.
Try it at matl.io
Explanation:
l       % push 1
_       % unary minus
5       % push 5, corresponds to type 'uint64'
Z%      % convert 1 to this type
E       % double
ZD      % display as a string

It'd need to be YY5Z%ZD to force uint64 type, but I don't know why using 1 5Z% instead just works...

You can't use 8.

@xnor Oops, fixed.

Can you add a demo link using either https://matl.suever.net or http://matl.tryitonline.net?

@Suever Sure, it's there now.

@Sanchises It's a Matlab thing: typecast(inf,'uint64') doesn't give 18446744073709551615 either. Not sure why. typecast depends on the internal data representation, so I guess anything can happen

@LuisMendo Ah, of course - I thought cast was used, but it makes sense if typecast is used. Thanks for clearing that up.

Brain-Flak, 223 193 bytes
Includes +1 for -A
-30 thanks to DJMcMayhem
((((((((((((((((((((((((()()()){}){}()){}){}())[()()()()])[][]())[[]()()])[]))()()()())[[]()()])[][()])[()()()()])()()()())[(()()()){}()])()()()()))()()())[()])[()()]))()()()())[(()()()){}()])

Try it online!
This just pushed the ASCII values of and prints as characters.
For reference, it takes 338 bytes to generate the actual number using the Integer meta golfer.
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()()()){}()){}){}()){}()){({}[()])}{}()){}()){}())){}{})){}{})()){}{})){}{})){}{})()){}{})){}{})){}{}){}){}())){}{}){}())()){}{})){}{}){}){}){}())()){}{})()){}{})){}{}){}())){}{})()){}{})){}{})){}{})){}{})()){}{})()){}{})){}{}){}())){}{}){}){}())()){}{})()){}{})){}{})

Try it Online!

You could save a bunch if you take advantage of the stack-height nilad []. For example: ((((((((((((((((((((((((()()()){}){}()){}){}())[()()()()])[][]())[[]()()])[]))()()()())[[]()()])[][()])[()()()()])()()()())[(()()()){}()])()()()()))()()())[()])[()()]))()()()())[(()()()){}()]) (Possibly more I'm missing)

Also, I think you can add one byte for -A since standard invocation already includes -f, so it's only one off to do -fA instead

@DJMcMayhem When did we start using +1 for the arguments? I didn't think about [] I'll look at that when I get a chance. Thanks.

Swift, 8 bytes
UInt.max

outside playground / repl - 15 bytes
print(UInt.max)

TI-Basic, 10 bytes
9+7
Ans^Ans-0!

TI-BASIC can't calculate, store or display this number exactly—floats only have 14 digits (about 44 bits) of precision.

JavaScript, 50 bytes 47 bytes
parseInt(5%3+"7nq9nb9r7b",33+7-9)+btoa("×y")

Why do you append the answer to ''?

@Marie it doesn't: https://repl.it/repls/SubstantialNoisyRectangle

You misunderstood. Why does your code start with ''+? Unless I am missing something, which is possible, you dont need that.

ah, ok. I didn't read the requirements right. It can be "either a number, or a single string". Thank you

Lol, I didnt notice that but my actual point was that btoa returns a string so either way the result should be a string.

x64 Assembly, 7 bytes
hex (assembled): 4831C048FFC8C3
disassembled, commented:

    XOR RAX,RAX    ;Zero the value of 64 bit register RAX
    DEC RAX        ;Decrement the value of RAX
    RET            ;Return this value
RAX is a 64 bit register, and is most often used to return integer arguments (eg, C). By decrementing 1, its value rolls over from 0 to... 2^64-1, which is exactly needed.Though, the assembled binary contains ones and fours and eights, the assembly doesn't, but the assembled file is counted in assembly, so does it count? Ow, my head.Also, output is return value in this case.

Pyth, 6 bytes
C*h7"ÿ

Try it online!
How it works
C*h7"ÿ
    "ÿ   creates the string "ÿ" (U+00FF)
  h7     creates 8 (7+1)
 *       generates "ÿÿÿÿÿÿÿÿ"
C        convert to integer from base 256

This works because 18446744073709551615 = 0xFFFFFFFFFFFFFFFF.

MathGolf, 3 bytes
Port of the 05AB1E answer. But 1 byte shorter.
♦ó(

Try it online!

GolfScript, 16 14 12 9 7 bytes
9(.+.?(

Try it online!
9(.+.?(
     9( = 8
     .+ = +8 = 16
     .? = ^16 = 16^16
     (  = -1

Some alternative solutions (also 7B)
5(33(?(
7).+.?(

Welcome to Code Golf, and nice answer!

Jelly, 7 bytes
3’*“@‘’

Try it online!

Why does the TIO link have different code?

@Okx Forgot to update the link, fixed :)

I think you could do 3’ to get 2.

@ETHproductions thanks :P.

TI-Basic, 14 11 bytes
int(e
Ans^Ans²³-1

Many commands in TI-Basic are single or two-byte tokens.
The superscript characters are different tokens, so they are allowed.

Javascript 55 bytes
alert(""+(590300>>5)+(59530-3>>3)+7370955+(3*59*73>>3))

the code generates and then alerts the string 18446744073709551615 using bitwise operations
590300>>5 18446
59530-3>>3 7440
7370955
3*59*73>>3 1615

Displays 2588673709551615 for me...

alert(0xafebff0+'7370955'+(3*59*73>>3)) works fine

I am leaving it as it is for the sake of keeping the method used instead of just copying someone else now.

C#, 20 bytes
()=>ulong.MaxValue;

This is neither a full program nor a function / lambda and therefore invalid.

Hello, welcome to the site! As Corvus_192 pointed out, this isn't a full program or function, so it is invalid. If you output this value somehow, the answer will be valid. (For example, print to the console, return from a function, etc.) I'm going to vote to delete this answer for now, but if you [edit] your answer to be valid, I will retract my vote, or vote to undelete it. You could also [flag] it for a moderator to undelete it. Thanks!

Pyth, 9 7 bytes
t^Jyh7J

Online interpreter link.
Uses Emigna's algorithm.
Thanks to Leaky Nun for digging this answer out so that I could -1 it.
-1 because I found yh7 which is shorter than +9 7.
yh7 seems to be the shortest way we can make 16 without using 12468.

I'm sure you know what you can golf down now.

@LeakyNun The thing is that I can't use 12468, although this is an answer from when I was inexperienced. Let's see what we've got here...

It's the same as the previous answer from you wherein I commented.

@LeakyNun I found something else too. Golfed.

C++, 26 24 16 bytes
26 bytes: My first submit
main(){std::cout<<(~0UL);}

[EDIT]24 bytes: () is not necessary
main(){std::cout<<~0UL;}

[EDIT]16 bytes: without main(){}
std::cout<<~0UL;

Obviously, Every c++ program must have an entry point function.
So I think we should not count it as a part of the answer.

Thanks, and i'm sorry for violate the rules. i'm totally new to this site xD

no worries - the site has a couple of things you'll need to get used to, but it's definitely a great way to waste time and have some fun, check out the questions guide and if you have any questions just make a post in the meta forums - best of luck.

@ConnorLSW this is not the case, we go as far as allowing answers with exactly the same content as each other (currently at +24/-7). We absolutely encourage users to post answers in the same language as already posted in.

Chip, 67 bytes + 3 bytes = 162 70 bytes
(+3 is for flag -w)
*Z~vZZZZvZvvZZZZvZZ-vZZvZZ-ZZvZZt
e*fad`c'`bac^^zba^^bc da^^cabca^c

Try it online!
Chip is a 2D language inspired by integrated circuits, input and output are broken down into individual bits which travel through gates and across wires.
Let's look at the ungolfed version:
*Z~-v-Z-Z-Z-Zv-Zvv-Z-Z-Z-Zvv-Zv-Zvv-Z-Zv-Zv-Zv-Z-Zv-Z-Zvt
e*f a d c c bc abc c c   abc ab abc   ad ac ac a bc a ac

The first portion has two components: *Z~ and e*f. *Z~ creates a 1-cycle pulse to kick off the circuit. e*f is equivalent to the value 0x30, which is the ASCII code for "0".
The remainder of the circuit has one portion for each ASCII digit of the output. For example:
-Zv-
 bc

The elements a, b, c, and d are the low four bits of output: a is 0x01, b is 0x02, and so on. In this sample, we have b and c, giving us 0x02 | 0x04 = 0x06. This combines with the code above to give us 0x30 | 0x06 = 0x36, which is the ASCII code for "6".
The Zs with nothing below them simply result in "0".
At the end, t causes the program to halt.

If instead you want the actual binary value instead, corresponding to eight 0xFF bytes, you can accomplish this in only 22 + 3 = 25 bytes:
a*ZZZZZZZt
dc
*eh
fg*b

The output of this can be verified by e.g. piping it into od -vtu8.

This is answer 111111

@wat Oooo so it is :)

Ruby, 16 12 bytes
p~0^~0>>~077

Prints out the number. In REPL mode this would be 11 bytes (without the 'p')

Mathematica 44 39 Bytes, No numbers
Well I could do the 22 Byte answer Print[(9+7)^(9+7)-3^0]
Here's an answer using addition to build up to the desired number with no numbers in the code:
f=Nest[#+#&,p=E/E,#]&;f@f@(f@p+f@f@p)-p

Saved 5 bytes thanks to @Martin-Ender

p=E/E and f@f[f@p+f@f@p]

Actually, it's shorter to define an operator ± instead of a function f and you can delay assigning p until the Nest is being called: ±x_:=Nest[#+#&,p=E/E,x];±±(±p+±±p)-p

Thanks for the tips. Incorporating the first two. The ± character eats up 2 bytes, so no savings by that measure, but it costs 3 extra bytes to define.

± is a single byte in several single-byte code pages e.g. the Windows ANSI code page CP1252, which is actually the default encoding for source files on Windows installations.

AWK, 39 bytes
{$0=(a+=++a)^(a*=a*=a*a);sub(".$",5)}5

Usage:
awk '{$0=(a+=++a)^(a*=a*=a*a);sub(".$",5)}5' <<< " "

Annoyingly AWK has trouble with integer math beyond 2^53 since it internally converts large integers to 64-bit doubles.  Since 2^64 can be exactly represented as a double, its string representation should be exactly 18446744073709551616 (it is on my machine, anyway). Unfortunately, 2^64 - 1 == 2^64, so I could not simply decrement the value, hence the workaround via string substitution.
Byte-count includes 1 additional byte due to requiring at least 1 byte for input which could be ctrl-D
Try it online!

MATL, 7 bytes
I3Z%WZD

Try it online!
Do a typecast on 3 (actual number doesn't matter much) to uint64, which reinterprets the bits of the default double precision float as an unsigned integer, giving a large value. Raise that to the power of 2, overflowing the range of uint64, which makes Matlab clamp it to the upper limit of 18446744073709551615.

brainfuck, 99 bytes
-->>->+>->>>+>->+>>+>->>>+>+>>>+>+[>+++[-<+++++>]<[->+++<]<++]>>+>>->>+>+>++>->>->>->>>>->>>+>[+.<]

Try it online!
Uses a ternary system for numbers between 0 and 8 (and a little cheat for the 9).
-, - = 0
-, 0 = 1
-, + = 2
0, - = 3
0, 0 = 4
0, + = 5
+, - = 6
+, 0 = 7
+, + = 8
+, ++ = 9

JavaScript, 67 52 47 45 39 bytes
b=9+7;(b**b+'').substr(0,b)+btoa('×y')

Stax, 5 bytes
üó|>b

Run and debug it
This is simply the packed version of the program 64|2v which means 2**64-1. Yes, boring.

Brain-Flak, 62 58 bytes
(()())((()()()){}){({}<({({})({}[()])}{})>[()])}{}({}[()])

Try it online!
This runs into a timeout, but here's the "source".
(()())                 init stack with 2
((()()()){}){          repeat 6 times
    (
        {}
        <({({})({}[()])}{})> square the value
        [()]           decrement loop counter
    )
}
{}                     pop 0
({}[()])               decrement value
                       implicitly print it

It calculates ((((((2^2)^2)^2)^2)^2)^2)-1 and prints it

C (clang), 26 18 16 bytes
f(){return~0UL;}

Try it online!
Saved 8 bytes from changing from printf to return. Saved 2 bytes by using
the bitwise NOT from the C++ answer.

Your returned type is signed int

Python 2, 21 bytes
print~-(5-3)**(97-33)

Try it online!
5-3 = 2, 97-33 = 64, ~- to decrement.

Cascade, 12 bytes (UTF-8)
#
(
*
*
*
Ā

Try it online!
I can't think of a cleverer way to fold this up that wouldn't kill the squaring. Note that Ā has codepoint 256. Two characters can be shaved off by using 65536 instead, but it comes out to precisely the same byte count:
Cascade, 12 bytes
#
(
*
*

Try it online!

Julia 1.0, 17 15 bytes
print(~UInt(0))

Try it online!

Bash, 27 bytes
printf %u $[57#OSiLrEickbS]

Try it online!
Uses pre-calculated base-57 string. Why base-57? Because anything larger would require one of the prohibited digits.
printf %u $[-3/3] would also work for 17 bytes, but that’s been done...

Or use $[~0] for 15 bytes.

@GammaFunction, printf %u $[~0] is giving me a "syntax error: operand expected" on my bash.

Ah, it must be a Bash 5 thing. My mistake, that would make it non-competing.

Nim, 14 bytes
echo high uint

Attempt This Online!

MSSQL, 33 37 30 29 27 bytes
SELECT power(9.+7,9+7)-77*5

Bigint is too big, so I'm counting 2^64-1 manually. I'm not sure why, but power(2,64) gives 18446744073709552000, so I have to substract 385.
-2 bytes thanks to @ETHproductions

Source code can't contain 2.

@MichaelMcGriff fixed.

power(2,64) is probably converted from floating-point, and the conversion routines are probably limited by the 17-digit known precision of floating-point values i.e. they can't assume you want exactly 2^64, so they just give you a value which converts to the same floating-point value.

@ETHproductions yes, thank you.

Japt, 17 bytes
GpG s r#È*A+PG+Fs

Try it online!

Vim, 41 bytes:
:im a <C-o><C-v><C-a>
i0a7a3a3a5a73a3a073709550a5a0a5

This uses the <C-a> command (increment) to get around the restriction of not using 1, 2, 4, 6, or 8. No TIO link since this doesn't seem to work in V, but it definitely works on vim locally.

Cardinal 42 bytes
%+.+=tt.''..*."7"'.."07370955"0+.*t.0+.**.

Try it Online

Rust, 43 42 31 bytes
fn main(){print!("{}",!0usize)}

This isn't portable code (assumes a 64-bit architecture), but I can't use the u64 type due to its name containing forbidden characters.

I think you can remove the space after the comma.

Oh, beginner mistake! Thanks, updated :)

J, 10 bytes
<:JSB^<:5x

JSB is a constant equal to 65536. <: is x - 1. 5x is 5 as an extended integer. ^ is exponentiation.
I spent a really long time working on this. Here are my other solutions:
<:JSB^<:5x
<:^~+:>:7x
<:^~*:<:5x
<:^~*:>:3x
<:^~+:<:9x
<:^~x:JCMPX
<:x:*:*:JSB
<:^~x:%:#a.
#.1x#~*:<:9
<:x:^~>.^^^0
<:x:^~>.^^*_
<:^~<:p:>:5x
<:^~-:x:JBOXED
<:x:^~>.^~^*_
<:x:^~>.^~^^~%_
<:%:*:^:5+:<:9x
<:x:+:+:9!:20''
<:x:^~*:+:+:*__
>:+:#.1x#~#.6#1
<:x:*:*:-:JCHAR2
<:*:*:*:*:+:<:9x
<:x:^~>.%:3 u:EAV
<:x:*:*:3!:0 s:''
<:x:^~>.^^*JCHAR4
<:JCHAR^x:+:JBOXED
<:x:^~>.^^*#dbhelp
<:x:^~>.^^*3 u:DEL
<:x:^~>.^^*#show'show'
<:x:dfh":(>:9)^x:%:#a.

><>, 17 15 bytes
Updates

Replaced ab-- with i+ to achieve -1.

b5+:*:*:*:*i+n;

Try it online!
The idea is to factor 1616 into (((162)2)2)2, which can be easily computing by duplicating the stack and multiplying :*.
Explanation
b5+:*:*:*:*i+n;

b                     Push 11
 5                    Push 5
  +                   Add to make 16
   :*                 Square  ->  16²
     :*:*:*           .. another 3 times to make
                           16¹⁶ = (((16²)²)²)²
           i          Push -1 because no input
            +         16¹⁶ + (-1) = 16¹⁶-1
             n;       Print and Exit

14 bytes

Brain-Flak, 122 bytes
(()())({({})({}[()])}{})({({})({}[()])}{})({({})({}[()])}{})({({})({}[()])}{})({({})({}[()])}{})({({})({}[()])}{})({}[()])

Try it online!
Also works in Mini-Flak

You can shorten this. Instead of 2^2^2, you can use 422 to get 16. (((()()()()){}){}). That's 24 Bytes shorter

Java, 92 Bytes :-D
class a{public static void main(String[] a){System.out.print(Long.toUnsignedString(-3/3));}}

JavaScript, 34 25 bytes (courtesy of l4m2)
(a=BigInt(9+7))**a-a/a+''

Works in any console that supports BigInts.

27

25

Keg, 6 bytes
\∑\@Ë;

Try it online!

Attache, 12 bytes
{$`e^$`G-!0}

Try it online!
Uses Attache's inbuilt number compression literals. $`<string> decompresses <string> into a number. In this case, e maps to 4, and G to 32. Another solution would be to replace both with $`q, which maps to 16. We subtract 1, which can be calculated as !0, or \$0!\$. This is a lambda returning the appropriate value.

x86_64 machine code (Linux), 7 bytes
00000000: 4831 c048 f7d0 c3                        H1.H...

Assembly (NASM):
section .text
global func
func:
xor rax, rax
not rax
ret

Try it online!

xor rax, rax => xor eax, eax as upper32 is automatically zeroed

Vyxal, 4 bytes
kḭ²‹

Try it Online!
2^32 squared, minus one.

₆E‹ for -1 byte

Fig, \$7\log_{256}(96)\approx\$ 5.762 bytes
{^{3C/@

Try it online!
{^{3C/@
  {3    # 3 - 1
 ^      # To the power of
    C/     # The charcode of
      @    # '@' (64)
{       # Decremented

Batch, 64 59 58 54 bytes
@set a=@cmd/cset/a
%a%0xafebff0
%a%737095
%a%0xc99f

Port of my JavaScript answer. Edit: Saved 5 bytes thanks to @Arnauld.

Python, 19 bytes
In REPL
int('3'*(35-3),7-3)

Not in REPL
print int('3'*(35-3),7-3)

Pyke, 5 bytes
Zw`@t

Try it here!
 w`   -   64
Z  @  -  set_bit(0, ^)
    t - ^ -1

Ruby, 18 bytes
p (9+7)**(9+7)-7/7

Would (9+7)**(9+7) save you a byte?

SmileBASIC, 35 bytes
?POW(!.+!.,#X)LOCATE #A,0?ASC("x")

x should be replaced with CHR$(1615)

Groovy, 28 Bytes
{++(Long.MAX_VALUE/0.5)}

Try it: https://groovyconsole.appspot.com/edit/5145694419550208

MUMPS, 15 bytes
w 9+7**(9+7)-'0

SmallTalk – 60 characters
Transcript show:(((7+9)raisedTo:(7+9))-(3/3))printString;cr.

asm2bf, 9 bytes
Function body assuming r1 = 0, returns the desired value in r1.
decr1
ret

Japt, 10 bytes
GîGpG)+#¡5

Try it
GîGpG)+#¡5
G              :16
 î             :Slice the following to that length
  GpG          :  16**16
     )         :End slice
      +        :Append
       #¡5     :1615

Whitespace, 61 bytes
[S S S T    S N
_Push_2][S N
S _Duplicate][T S S N
_Multiply][S N
S _Duplicate][T S S N
_Multiply][S N
S _Duplicate][T S S N
_Multiply][S N
S _Duplicate][T S S N
_Multiply][S N
S _Duplicate][T S S N
_Multiply][S N
S _Duplicate][T S S N
_Multiply][S S S T  N
_Push_1][T  S S T   _Subtract][T    N
S T _Print_as_integer]

Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.
Try it online (with raw spaces, tabs and new-lines only).
Explanation:
Pretty straight-forward:

Push 2
Square itself six times
Decrease by 1
Output as integer

Pushing and outputting the expected integer in one go would be 72 bytes instead.

Factor (Windows only), 14 bytes
GPTR on-bits .

Only works on Windows (and hence not on TIO/ATO). Not sure whether that's allowed or not.
GPTR is a constant equal to 64 loaded on machines running Windows. on-bits takes a value and creates a number with that many on bits.

Fig, 17 bytes (UTF-8)
OC"䠎ᴐ᳊╏ɧ

Try it online!
Fig doesn't have too much in the way of number builtins, so here is a charcode version. Just get the charcode of each character, then join.

C (gcc), 9 bytes
-Df()0UL-

Try it online!
Tech used before

Pyt, 5 bytes
3⁻⁸⁸⁻

3⁻     pushes 3, then decrements
  ⁸    raises to the 8th power
   ⁸   8th power again
    ⁻  decrement
       implicit print

Try it online!

Gol><>, 8 bytes
"@"XMn;

Try it online!
The unprintable is char 0x02
Explanation
".@"XMn; # whole program
".@"     # 0x02, 64
    X    # e`X`ponentiate
     m   # -1
      n  # output
       ; # terminate execution

Thunno, \$ 10 \log_{256}(96) \approx \$ 8.23 bytes
aeaA,D^nA~

Attempt This Online!
No numbers at all!
Explanation
aeaA,D^nA~  #                           STACK:
ae          # Constant for 160          160
  aA        # Constant for 10           160, 10
    ,       # Integer divide            16
     D^     # To the power of itself    18446744073709551616
       n    # Negate                    -18446744073709551616
        A~  # Bitwise not               18446744073709551615
            # Implicit output

Stax, 4 bytes
VuJv

Run and debug it
Unpacked and packed it's 4 bytes
Explanation
Vu   # 2**32
  J  # squared
   v # -1

Zsh, 27 bytes
!
<<<$?$[35#ULOSOKRBNKG]$?5

Attempt This Online!
Zsh only allows signed 64 bit integers, so we need a string method. Notice that ULOSOKRBNKG is 84467440737095516 in base 35, and contains no disallowed characters. Then we just need to attach two 1s and a 5: 5 is an allowed digit anyway, and we can get 1 by running a command that fails (in this case !) and taking its exit status in $?.

Python, 20 (or 26) bytes
(5-3)**ord('@')-3**0

ord('@') is equal to 64.
The full function/programme (@BusinessCat, I hope this is more in line with what is expected) would add 6 bytes:
print (5-3)**ord('@')-3**0

The 26 byte version would work if we wanted to pipe the output:
python -c "print (5-3)**ord('@')-3**0"

The 20 byte version would not.

This is a snippet, every submission needs to be a full program or function.

you can do 3/3 instead of 3**0 and you can remove the space after print to save 2 bytes

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Smallest multiplier that reveals a factor of a semiprime
Given a semiprime N, find the smallest positive integer m such that the binary representation of one of the two factors of N can be found in the binary representation of N * m.
Example
Let's consider the semiprime N = 9799.
We try different values of m, starting at 1:
 m |  N * m |   N * m in binary
---+--------+------------------
 1 |   9799 |    10011001000111
 2 |  19598 |   100110010001110
 3 |  29397 |   111001011010101
 4 |  39196 |  1001100100011100
 5 |  48995 |  1011111101100011
 6 |  58794 |  1110010110101010
 7 |  68593 | 10000101111110001
 8 |  78392 | 10011001000111000
 9 |  88191 | 10101100001111111
10 |  97990 | 10111111011000110
11 | 107789 | 11010010100001101

We stop here because the binary representation of the last product contains 101001 which is the binary representation of 41, one of the two factors of 9799 (the other one being 239).

So the answer would be 11.
Rules and notes

Trying even values of m is pointless. They were shown in the above example for the sake of completeness.
Your program must support any N for which N * m is within the computing capabilities of your language.
You are allowed to factorize N beforehand rather than trying each possible substring of the binary representation of N * m to see if it turns out to be a factor of N.
As proven by MitchellSpector, m always exists.
This is code-golf, so the shortest answer in bytes wins. Standard loopholes are forbidden.

Test cases
The first column is the input. The second column is the expected output.
         N |    m |         N * m |                              N * m in binary | Factor
-----------+------+---------------+----------------------------------------------+-------
         9 |    3 |            27 |                                      [11]011 |      3
        15 |    1 |            15 |                                       [11]11 |      3
        49 |    5 |           245 |                                   [111]10101 |      7
        91 |    1 |            91 |                                    10[1101]1 |     13
       961 |   17 |         16337 |                             [11111]111010001 |     31
      1829 |    5 |          9145 |                             1000[111011]1001 |     59
      9799 |   11 |        107789 |                          1[101001]0100001101 |     41
     19951 |   41 |        817991 |                       1[1000111]101101000111 |     71
    120797 |   27 |       3261519 |                     11000[1110001]0001001111 |    113
   1720861 |  121 |     208224181 |               11000110100[100111111101]10101 |   2557
 444309323 |  743 |  330121826989 |    100110011011100110010[1101010010101011]01 |  54443
 840000701 | 4515 | 3792603165015 | 11011100110000[1000110000111011]000101010111 |  35899
1468255967 |   55 |   80754078185 |      1001011001101010100010[1110001111]01001 |    911

Hmm, I smell an algorithm similar to the ones we used on your Blackjack sequence challenge...

@ETHproductions Hmm, really? They're honestly supposed to be completely unrelated.

Well, they're mainly similar in that you need to check every contiguous substring for a specific property. Other than that they really are pretty unrelated.

"and probably encouraged" - I'm sorry. We don't care about the speed of our code.

@JanDvorak Fair enough. Removed.

Perhaps it would be faster to divide N by every substring of N*m, even, and not attempt factorization?

Don't worry. You can still encourage us, even if it doesn't affect our code.

In JavaScript particularly, must we support all inputs for which N*m is under 2^53, or can we stop at 2^31?

@ETHproductions Because 2^31 is a limit of the language for certain operations, I'd say that it's OK.

Pyth, 13 bytes
ff}.BY.B*TQPQ

Demonstration
Explanation:
ff}.BY.B*TQPQ
f                Find the first integer >= to 1 where the following is true
 f         PQ    Filter the prime factors of the input
        *TQ      Multiply the input by the outer integer
      .B         Convert to a binary string
   .BY           Convert the prime factor to a binary string
  }              Check whether the factor string is in the multiple string.

05AB1E, 18 16 15 bytes
-2 bytes thanks to Riley!
-1 byte thanks to Emigna!
[N¹*b¹Ñ¦¨båOiNq

Explanation:
[                   # Infinite loop start
 N                  # Push the amount of times we have iterated
  ¹*               # Multiplied by input
    b              # Convert to binary
     ¹Ñ¦¨b         # Calculate the proper divisors of the input in binary excluding one
          åO       # Check if a substring of N * m in binary is in the divisors
            iNq    # If so, print how many times we have iterated and terminate the program

Try it online!

¹Ñ¦¨båO should work instead of checking each substring.

@Riley thanks for spotting that!

You can save another byte replacing ¼ and ¾ with N.

@Emigna I didn't know about that trick, thanks!

JavaScript (ES6), 96 95 80 bytes
n=>F=m=>(k=p=>p&&(q=1,g=x=>1<x&&x<n&n%x<1|g(x>>1,q*=2))(p)|k(p-q))(n*m)?m:F(-~m)

A function which returns a recursive function which uses a recursive function which uses a recursive function. I'm really starting to wonder if the .toString(2) route would be shorter...
Assign to a variable e.g. f=n=>... and call with an extra pair of parens, f(9)(). If that's not allowed (the meta post is at +6/-2), you can use this 83-byte version with standard invocation:
f=(n,m)=>(k=p=>p&&(q=1,g=x=>1<x&&x<n&n%x<1|g(x>>1,q*=2))(p)|k(p-q))(n*m)?m:f(n,-~m)

Both versions work for all but the last three test cases. You can try these test cases as well by changing x>>1 to (x-x%2)/2.

Not sure if there's really a consensus about it (we are at +6/-2 at the time of posting), but as far as I'm concerned, the first input format is fine.

Bash + Unix utilities, 85 84 bytes
for((;;m++)){ dc -e2o$[$1*m]n|egrep -q $(dc "-e2o`factor $1`nBEPn")&&break;}
echo $m

Try it online!

I'll point out also that m always exists for any semiprime n.  Here's why:
Write n=pq, where p and q are prime and p <= q.
Let b the number of digits in the binary representation of n-1.  Then, for any k between 0 and n-1 inclusive, p*(2^b)+k in binary consists of the binary representation of p followed by b additional bits representing k.
So the numbers p*(2^b)+k for 0 <= k <= n-1, when written in binary, all start with the binary representation of p.  But these are n consecutive numbers, so one of them must be a multiple of n.
It follows that we have a multiple mn of n whose binary representation starts with the binary representation of p.
Based on this, one can come up with an upper bound for m of 2 sqrt(n).  (One can probably get a much tighter upper bound than this.)

Haskell, 161 bytes
import Data.List
(!)=mod
a#b|a!b==0=b|0<1=a#(b+1)
g 0=[]
g n=g(n`div`2)++show(n!2)
(a%b)c|g b`isInfixOf`g(a*c)=c|0<1=a%b$c+1
f n=min(n%(n#2)$1)$n%(n`div`(n#2))$1

Straightforward check. Factor first, then search linearly starting at 1 and take the minimum of the value for both factors.
Takes a few seconds for the last testcase (1468255967), ghci reports (15.34 secs, 18,610,214,160 bytes) on my laptop.

Mathematica, 83 bytes
1//.x_/;FreeQ[Fold[#+##&]/@Subsequences@IntegerDigits[x#,2],d_/;1<d<#&&d∣#]:>x+1&

Brachylog (2), 14 bytes
ḋḃᵐD∧?:.×ḃs∈D∧

Try it online!
There's more than one way to write this in 14 bytes in Brachylog, so I went for the most efficient. As is common for Brachylog submissions, this is a function submission; its input is the semiprime, its output is the multiplier.
Explanation
ḋḃᵐD∧?:.×ḃs∈D∧
ḋ               Prime decomposition (finds the two prime factors)
 ḃᵐ             Convert each factor to binary
   D            Name this value as D
    ∧?          Restart with the user input
      :.×       The output is something that can be multiplied by it
         ḃ      to produce a number which, when expressed in binary
          s     has a substring
           ∈D   that is an element of D
             ∧  (suppress an implicit constraint that D is the output; it isn't)

Prolog's and Brachylog's evaluation order is set by the first constraint that can't immediately be deduced from the input. In this program, that's a constraint on the result of a multiplication, so the interpreter will aim to keep the operands of the multiplication as close to 0 as possible. We know one of the operands, and the other is the output, so we find the smallest output we can, which is exactly what we want.

PowerShell, 136 bytes
param($n)$a=2..($n-1)|?{!($n%$_)}|%{[convert]::ToString($_,2)};for(){$b=[convert]::toString(++$m*$n,2);if($a|?{$b-like"*$_*"}){$m;exit}}

Try it online!
Very lengthy due to how conversion-to-binary works in PowerShell. :-/
Takes input $n, loops through 2 to $n-1 and pulls out the factors !($n%$_). Sends those into a loop |%{...} and converts each of them to a binary (base 2) string. Stores those binary strings into $a.
Then we enter an infinite for(){...} loop. Each iteration, we increment ++$m, multiply that by $n, and convert that to a binary string, stored into $b. Then, if that string is regex -like any strings in $a, we output $m and exit.

Perl 6, 66 bytes
->\n{first {(n*$_).base(2)~~/@(grep(n%%*,2..^n)».base(2))/},^∞}

Regex-based.
Super slow, because it brute-forces the factors of n all over again at every regex match position of every number that is tried.
Calculating the factors only once, improves performance but makes it 72 bytes:
->\n{my @f=grep(n%%*,2..^n)».base(2);first {(n*$_).base(2)~~/@f/},^∞}

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Find Recursively Prime Primes
The Recursively Prime Primes is are sequence of primes such that
p(1) = 2
p(n) = the p(n-1)th prime

Here is an example of how one might calculate the 4th Recursively Prime Prime.
p(4) = the p(3)th prime
p(3) = the p(2)th prime
p(2) = the p(1)th prime
p(1) = 2
p(2) = the 2nd prime
p(2) = 3
p(3) = the 3rd prime
p(3) = 5
p(4) = the 5th prime
p(4) = 11

You should write a program or function that when given n, outputs the nth Recursively Prime Prime.
You may choose to use 0 based indexing if you wish in which case you must indicate so in your answer.
This is code-golf so the goal is to minimize your byte count.

Test Cases
1 -> 2
2 -> 3
3 -> 5
4 -> 11
5 -> 31
6 -> 127
7 -> 709
8 -> 5381
9 -> 52711

Relevant OEIS entry: OEIS A007097

Oasis, 3 bytes
The program is 0-indexed. Code:
<q2

Uses the formula: a(n) = nth_prime(a(n-1) - 1), with the base case a(0) = 2.
Code explanation:
  2   = a(0)

<     # Decrement a(n - 1) to get a(n - 1) - 1
 q    # prime(a(n - 1) - 1)

Try it online!

Mathematica, 16 bytes
Nest[Prime,1,#]&

Anonymous function. Takes a number as input and returns a number as output.

Actually, 7 bytes
1@⌠DP⌡n

Try it online!
Explanation:
1@⌠DP⌡n
1        push 1
 @       swap 1 with n
  ⌠DP⌡n  do the following n times:
   DP      decrement, prime at index

Jelly, 5 4 bytes
1 byte thanks to @Dennis.
1ÆN¡

Try it online!
Explanation
1        Starting with n = 1,
 ÆN      replace n by the nth prime
   ¡     (input) times.

You don't need the ⁸.

@Dennis So does ¡ only accept nilads as repetitions and default to input if none are found?

<f><n>¡ happily accepts monadic or dyadic atoms for <n>. However, if <f> is a nilad, something must be wrong, so it is parsed as <f>¡ instead and takes the last input (last command-line argument, STDIN is there are none) as <n> instead.

JavaScript (ES6), 71 bytes
p=(n,x=1)=>n?p(n-1,(N=y=>x?N(++y,x-=(P=z=>y%--z?P(z):z==1)(y)):y)(1)):x

Ungolfed, you have three separate recursive functions:
P=(n,x=n)=>n%--x?P(n,x):x==1
N=(n,x=1)=>n?N(n-P(++x),x):x
p=(n,x=1)=>n?p(n-1,N(x)):x

P determines whether n is prime;
N finds the nth prime;
p recursively runs N on input 1 n times.

MATL, 6 bytes
1i:"Yq

Try it online!
Explanation
1      % Push 1
i      % Input n
:      % Range [1 2 ... N]
"      % For each (that is, do the following N times)
  Yq   %   k-th prime, where k is the input
       % End for each (implicit)
       % Display stack (implicit)

R, 98 93 bytes
5 bytes thanks to @smci
Here is a horribly inefficient recursive solution:
f<-function(m,n=1){j<-1;for(i in 1:n){j<-numbers::nextPrime(j)};a<-ifelse(m==0,j,f(m-1,j));a}

Test Output:
f(6)
[1] 127

f(10)        ### takes almost a minute... YIKES!!!
[1] 648391

You can shave a little off by doing a<-ifelse(m==0,j,f(m-1,j))

74 bytes

@Giuseppe, you should post that as an answer... that is a considerable decrease!!! I have never seen if used like that before... pretty cool!!

@JosephWood nah, those are just standard golfs; the core algorithm didn't change. I'd suggest reading tips for golfing in R for some more cool golfing tips (although usually they are terrible R style).

05AB1E, 4 bytes
ÎF<Ø

Try it online!
Explanation
ÎF<Ø
Î    # Push 0 and input
 F   # Do input times...
  <   # Decrement
   Ø  # Get the nth prime (0-indexed) with n being the top of the stack

Husk, 6 bytes
!¡!İp2

Try it online!
Explanation:
!¡!İp2
 ¡           Make an infinite list by repeatedly applying a function
     2       Starting with 2
   İp        From the sequence of prime numbers
  !          Get the element at the given index (the previous number in the sequence)
!            Get the element at index (implicit input) in that infinite list

Bash + common utilities, 55
Since we're doing recursive primes, here's a recursive answer:
((SHLVL-2<$1))&&primes 2|sed -n "`$0 $1`{p;q}"||echo 1

Since recursion level counting is based off the $SHLVL built-in variable, then the answer can be off if you're already a few shell levels deep.  This is probably why this answer doesn't work on TIO.

If that's no good, then here's a more conventional answer:
Bash + common utilities, 58
for((i=$1;i--;));{
n=`primes 2|sed -n "$n{p;q}"`
}
echo $n

Try it online.

APL (Dyalog Extended), 10 8 bytes
Saved 2 bytes thanks to Adám
⌂pco⍣⎕⊢1

Try it online!
⍣ applies the function ⌂pco (nth prime) to 1 n times (n is taken through STDIN (⎕)).
Another previous solution, 10 bytes
⊢∘⌂pco/⍴∘2

Try it online!
⍴∘2 makes a vector of n 2's, then / reduces using the train ⊢∘⌂pco. ⊢ ignores its left argument, pco finds the nth prime, given n on the right. More generally, ⊢∘f/n⍴s applies f n-1 times to s.

⍭ may help with making this shorter.

@Razetime I did try that, but it appears to be the same length. I wish it used a positive number instead of -2 :(

Hm, that would be a good idea, but it would mess with older solutions. Let's ask about it in the orchard.

Full program.

@Adám Thanks, I didn't think of making a tradfn!

Vyxal, 5 bytes
1$(‹ǎ

Try it Online!
1$    # Push 1 and the input
  (   # Input times
   ‹ǎ # Decrement and get nth prime

Factor + math.primes.lists, 57 bytes
: p ( m -- n ) [ 2 ] [ 1 - p 1 - lprimes lnth ] if-zero ;

Try it online!
Explanation
Returns the 0-indexed member of the recursively-prime prime sequence.

: p ( m -- n ) ... ; Start a new word definition named p with stack effect ( m -- n ), declaring it takes one thing from the data stack and leaves one thing on the data stack.
[ 2 ] [ ... ] if-zero Is the input 0? Then return 2. Otherwise, do ....
1 - p Apply p to the input minus one.
1 - lprimes lnth Return the nth prime number.

Haskell, 58 bytes
1-indexed
f 1=2;f n=[x|x<-[2..],all((>)2.gcd x)[2..x-1]]!!(f(n-1)-1)

Try it online!
Explanation:
Uses the same 0-indexed prime-list access trick as Adnan's answer.
Essentially straight-up follows the specification otherwise.
f 1=2; -- base case
f n= -- main case
    [x|x<-[2..],all((>)2.gcd x)[2..x-1]]             -- list of all primes
    [x|x<-[2..],                                     -- consider all numbers
                               [2..x-1]              -- consider all smaller numbers
                all((>)2.gcd x)                      -- is coprime with them?
                    (>)2.                            -- 2 is greater than
                         gcd x                       -- gcd(x,lambda input)
                                        !!(f(n-1)-1) -- access the
                                                     -- f(n-1)-th 1-indexed prime

Husk, 10 bytes
?K2ȯ!İp₀←ε

Try it online!
A recursive function.

J-uby, 33 bytes
~(:-&(:**&(:take&Prime|:last)))&1

Attempt This Online!
Explanation
~(:- & (:** & (:take & Prime | :last))) & 1
               :take & Prime | :last         # nth prime
~(:- & (:** & (                     ))) & 1  # Apply to 1 input times

Created with the help of Luminespire.

Wonder, 23 bytes
p\.{1\2@:^(- p -#0 1)1P

1-indexed. Usage:
p\.{1\2@:^(- p -#0 1)1P}; p 3

Explanation
p\.{                #. Pattern matching syntax
  1\2               #. Base case p(1)=2
  @:^(- p -#0 1)1P  #. Other cases p(n)=nthprime(p(n-1)-1)
                    #. nthprime is 0-indexed
}                   #. Trailing bracket is optional in this case

Python 3, 85 bytes
p=lambda x:[i for i in range(2,5*x**x)if all(i%j for j in range(2,i))][x and~-p(x-1)]

Try it online!
Uses 0-indexing.

PARI/GP, 34 bytes
f(n)={r=1;for(i=1,n,r=prime(r));r}

Attempt This Online!


text:
How did I end up with this FizzBuzz?
FizzBuzz is so simple, bet you can do it backwards. In this challenge, you will be given the length of the FizzBuzz string and must give the positive integer that produced that string.
Description
To break this down, a FizzBuzz string for n is generated by the following algorithm.
Start with an empty string and, for every i=1..n (inclusive):

If i is divisible by 3 and by 5, append FizzBuzz to the string.
If i is just divisible by 3 append Fizz.
If i is just divisible by 5 append Buzz.
If i is divisible by neither, append the decimal representation of i.

So for example FizzBuzz(15) is the following:
12Fizz4BuzzFizz78FizzBuzz11Fizz1314FizzBuzz

You will be given Length(FizzBuzz(n)) and must determine n. You may assume that the input is positive and is always going to be the length of some FizzBuzz string.
Rules
Your solution may a complete program or a function definition in any standardly acceptable language. Your program/function may take in arguments and return answers in any standardly accepted way. Standard loopholes are forbidden.
You may assume that the input is positive and valid (describes the length of some FizzBuzz string) and is smaller than the largest integer representable natively in your language.
This is code golf, so shortest byte-count wins.
Examples
Here are some example cases
Length(FizzBuzz(n)) -> n
1                   -> 1
6                   -> 3
15                  -> 6
313                 -> 100
3677                -> 1001

Edit
Fixed last test case. Thanks @SteadyBox.

Argh! I tried to do recursion but my numbers were too big...

Related. Related.

Jelly,  16  14 bytes
2 bytes saved using more recent language features ) for µ€ and Ä for +\
3,5ḍS×4oDL$)Äi

Try it online! or see the test cases.
How?
Builds a list of the lengths of every item from 1 to the input, reduces by addition and then finds the one-based index of the input in the list. (This also means an invalid input results in 0, "not in list").
3,5ḍS×4oDL$)Äi - Main link: theLength
           )    - perform the chain to the left for each (€) in
                     implicit range from 1 to the input and
                     pass the result into the monadic chain (µ) to the right
3,5            - 3 paired with 5: [3,5]
   ḍ           - divides?  for a multiple of 15 [1,1]; sum = 2; times 4 = 8
    S          - sum       for a multiple of  5 [0,1]; sum = 1; times 4 = 4
     ×4        - times 4   for a multiple of  3 [1,0]; sum = 1; times 4 = 4
                           for none of those    [0,0]; sum = 0; times 4 = 0
          $    - last two links as a monad
        D      -     to decimal digit list
         L     -     length - e.g. 313 -> [3,1,3] -> 3
       o       - logical or: replace a 0 with the decimal length, keep the 4s and 8s
            Ä  - reduce with addition: e.g. [1,1,4,1, 4, 4, 1, 1, 4, 4, 2, 4, 2 ,2, 8]
                                         -> [1,2,6,7,11,15,16,17,21,25,27,31,33,35,43]
             i - index of theLength in that list (e.g. 15 is at index 6)

One thing I've always been curious about these "golfing languages":  what is the performance like?  Yes, I understand that the maintainability is borderline useless, but if you try to use this in a production environment, how does it compare with more common languages?

@TrippKinetics Jelly is pretty sluggish and memory intensive  - implemented in Python with little regard to performance. Others may perform better (Husk maybe?). APL looks like a golfing language and is very terse but is a programming language used in the real world for decades with good performance.

C, 81 78 bytes
l,i;f(n){for(l=i=0;l<n;l+=++i%3?i%5?snprintf(0,0,"%d",i):4:i%5?4:8);return i;}

68 bytes if you don't mind converting to double and back:
l,i;f(n){for(l=i=0;l<n;l+=++i%3?i%5?log10(i)+1:4:i%5?4:8);return i;}

Is "return i" even required, when "i" is a global variable?-) And you could replace that long snprintf call with a log10(i)+1, if that compiles and is allowed... It worked for me with gcc -lm

@Rennex The return i; is needed, because that is a standardly accepted way to output in code golf whereas only modifying a global variable is not. I considered using log10(i)+1, but I thought it might cause some issues because of converting to double and back (e.g. pow(i) is not reliable with integers). It seems now though that it works fine for all positive values that an int can represent, so I could probably use it. (With values larger than a simple int can hold, it does fail sometimes, but that doesn't matter here.)

Hmm, OK. I'm new to this code golf, but I looked at the rules link in the question, and it says "Functions may output by modifying their arguments or writing to out arguments". Doesn't that mean that at least a result pointer argument could be used?

@Rennex Yeah, I guess I could take the n in as a pointer and then just modify the value it's pointing to at the end, but that would require more code at the call site in order to be able to print the value, so it feels a bit like cheating to me.

MATL, 31 28 27 bytes
`@:tI5h!\XJA)VXznJ~z4*+G-}@

Try it online!
Explanation
`        % Do...while
  @:     %   Push array [1 2 ...k], where k is iteration index
  t      %   Duplicate
  I5h!   %   Push column vector [3; 5]
  \      %   Modulo, with broadcast. Gives 2 × k matrix
  XJ     %   Copy into clipboard J
  A      %   Row vector that contains true for columns that contain two nonzeros
  )      %   Index with that vector. This keeps numbers that are non-fizz/buzz
  V      %   Convert to string. This inserts spaces between numbers
  Xzn    %   Number of nonspace characters
  J      %   Push 2 × k matrix resulting from modulo operation again
  ~z     %   Number of zeros
  4*     %   Multiply by 4. Gives number of characters corresponding to fizz/buzz
  +      %   Add
  G-     %   Subtract input. This is the loop condition: exit if 0
}        % Finally (execute right before exiting loop)
  @      %   Push current iteration index
         % End (implicit)
         % Display (implicit)

Mathematica, 67 bytes
(For[n=s=0,s<#,s+=Tr[4Boole[{3,5}∣++n]]/. 0:>IntegerLength@n];n)&

This is both faster and shorter than my initial solution:
1//.x_/;Sum[Tr[4Boole[{3,5}∣n]]/. 0:>IntegerLength@n,{n,x}]!=#:>x+1&

or my desperate attempt to shorten it:
(s=0;1)//.x_/;(s+=Tr[4Boole[{3,5}∣x]]/. 0:>IntegerLength@x)!=#:>x+1&

Explanation
Standard For loop which increments n until s := Length(FizzBuzz(n)) is at least equal to the input #. The only interesting bit is how I calculate the length of the (n+1)-th term of the FizzBuzz sequence
                ++n                           Preincrement n
          {3,5}∣                              Test for divisibility by 3 and 5 (returns a list)
    Boole[         ]                          Convert True to 1 and False to 0
   4                                          Multiply by 4
Tr[                 ]                         Sum
                     /.                       Replace
                        0                     0 (leading space is necessary or it thinks we are dividing by 0.0)
                         :>                   with
                           IntegerLength@n    the number of digits in n

MATL, 31 30 28 bytes
:tI5h!\~s4*t~b10&YlkQ*+YsG=f

Uses the same idea as Jonathan Allen's Jelly solution.
Try it on matl.io!

Down to 28 now! :-P I think our approaches are more similar now

Ah, good job! Yeah, looks like it :)

Java 8, 100 97 bytes
Golfed:
l->{int i=0;for(String s="";s.length()<l;)s+=++i%15<1?"12345678":i%5<1||i%3<1?"1234":i;return i;}

Ungolfed:
import java.util.function.*;

public class HowDidIEndUpWithThisFizzBuzz {

  public static void main(String[] args) {
    for (final int[] data : new int[][] { { 1, 1 }, { 6, 3 }, { 15, 6 },
        { 313, 100 }, { 3677, 1001 } }) {
      final int fizzBuzzLength = data[0];
      final int expected = data[1];
      final int actual = f(l -> {
        int i = 0;
        for (String s = ""; s.length() < l;) {
          s += (++i % 15 < 1 ? "12345678" : (i % 5 < 1 || i % 3 < 1 ? "1234" : i));
        }
        return i;
      } , fizzBuzzLength);
      System.out.println("Length(FizzBuzz(n)) -> " + fizzBuzzLength);
      System.out.println("Expected            -> " + expected);
      System.out.println("Actual              -> " + actual);
      System.out.println();
    }

  }

  private static int f(IntFunction<Integer> function, int fizzBuzzLength) {
    return function.apply(fizzBuzzLength);
  }
}

Output:
Length(FizzBuzz(n)) -> 1
Expected            -> 1
Actual              -> 1

Length(FizzBuzz(n)) -> 6
Expected            -> 3
Actual              -> 3

Length(FizzBuzz(n)) -> 15
Expected            -> 6
Actual              -> 6

Length(FizzBuzz(n)) -> 313
Expected            -> 100
Actual              -> 100

Length(FizzBuzz(n)) -> 3677
Expected            -> 1001
Actual              -> 1001

Ruby, 69 66 bytes
->n{i=0;(i+=1;n-=i%3>0?i%5>0?i.to_s.size: 4:i%5>0?4:8)while n>0;i}

Originally, I was avoiding the nested ternary operator monstrosity and got down to 69 bytes:
->n{i=0;(i+=1;n-=(x=[i%3,i%5].count 0)>0?4*x:i.to_s.size)while n>0;i}

JavaScript (ES6), 62 57 bytes
f=(n,k=0)=>n?f(n-(++k%3?k%5?`${k}`.length:4:k%5?4:8),k):k

Test cases

f=(n,k=0)=>n?f(n-(++k%3?k%5?`${k}`.length:4:k%5?4:8),k):k

console.log(f(1   )); // -> 1
console.log(f(6   )); // -> 3
console.log(f(15  )); // -> 6
console.log(f(313 )); // -> 100
console.log(f(3677)); // -> 1001

Alternative expression with the same length: (!(++k%3)+!(k%5)<<2||\${k}`.length)`.

Javascript (ES6), 56 bytes

f=(x,s=i=0)=>s[x]?i:f(x,s+[++i%3?i%5?i:1e3:i%5?1e3:1e7])
<!-- snippet demo: -->
<input list=l oninput=console.log(f(this.value))>
<datalist id=l><option value=1><option value=6><option value=15><option value=313><option value=3677></datalist>

Python 3, 78 bytes
f=lambda i,n=1,s=0:~-n*(s==i)or f(i,n+1,s+(4*((n%3<1)+(n%5<1))or len(str(n))))

Recursive function. Will need the recursion limit increased for any result above 1000.
Explanation:
# i = length of final string
# n = current number in sequence, starting with 1
# s = length of current string, starting with 0
f=lambda i,n=1,s=0: \

# if s==1, this will evaluate to n+1, which is NOT 0, and will return
# else, it will evaluate to (n+1)*0, and trigger the second half of the OR clause
~-n*(s==i)or \

# recursively call the next iteration, with the next number in the sequence
f(i,n+1, \

# increase s by 4 if Fizz or Buzz, 8 if FizzBuzz, or len(n) if number
s+(4*((n%3<1)+(n%5<1))or len(str(n))))

k, 33 bytes
{1+&x=+\{(#$x;4;8)+/~3 5!'x}'1+!x}

Brief (python-ish) explanation:
{                                } / function(x):
                             1+!x  /   array from 1 to x, inclusive
                            '      /   for y in array:
        {                  }       /     function(y):
         (#$x;4;8)                 /       yield [ len(str(y), 4, 8 ][
                  +/~3 5!'x        /         sum([not(y mod 3), not(y mod 5)])
                                   /       ]
      +\                           /   cumulative sum of result of for loop
 1+&x=                             /   get index of x in cumulative sum, add one

Example using kmac 2016.06.28:
 f:{1+&x=+\{(#$x;4;8)+/~3 5!'x}'1+!x}
 ,/f'1 6 15 313 3677
1 3 6 100 1001

Welcome to Programming Puzzles & Code Golf! Just so you know, the downvote was cast automatically by the Community user when the answer was edited. I consider this a bug.

dc, 76 70 bytes
?sa0dsbsc[lc4+sc]sh[lbZ+sc]so[lcdlb1+ddsb3%0=h5%0=hlc=olcla!=y]dsyxlbp

Try it online!

Groovy, 76 bytes
def f(n){i=0;for(s='';s.size()<n;)s+=++i%15<1?"1"*8:i%5<1||i%3<1?"1"*4:i;i;}
Mostly the same as @Snowman's answer, but uses some Groovy magic/differences to cut down on the byte count.

Python, 93 bytes
def g(n,c=0,a=[4,0]):
 while n:c+=1;s=a[c%3>0]+a[c%5>0];s+=(s<1)*len(str(c));n-=s
 return c

Java 8, 95 93 bytes
l->{int j=0,i=0;for(;j<l;)j+=++i%15<1?8:i%3<1||i%5<1?4:Math.floor(Math.log10(i)+1);return i;}

This is the optimized version of @Snowman's answer

This returns incorrect results for me on the final two test cases: 75 instead of 100, and 686 instead of 1001.

Perl 6, 55 52 bytes

{1+first $_,:k,[\+] map {4*($_%%3+$_%%5)||.chars},1..*}

{(0,{my \i=++$;$_+(4*(i%%3+i%%5)||i.chars)}...$_)-1}

Try it online!
How it works
{                                                  }  # A lambda.
  0                                                   # Start with 0.
   ,{                                     }           # Use the iteration formula...
     my \i=++$;                                       #   Fetch current index.
               $_+(                      )            #   Last element plus:
                   4*(i%%3+i%%5)                      #     Fizz/Buzz/FizzBuzz length,
                                ||i.chars             #     or number length.
                                           ...$_      # ...until the input is reached.
 (                                              )-1   # Sequence length minus 1.

Japt, 20 bytes
@µ35ìx_XvZÃ*4ªXìÊ}f1

Try it
@µ35ìx_XvZÃ*4ªXìÊ}f1     :Implicit input of integer U
@                        :Function taking an integer X as argument
 µ                       :  Decrement U by
  35ì                    :    Digit array of 35
     x                   :    Reduce by addition
      _                  :    After passing each Z through the following function
       XvZ               :      Is X divisible by Z?
          Ã              :    End reduce
           *4            :    Multiply by 4
             ª           :    Logical OR with
              Xì         :      Digit array of X
                Ê        :      Length
                 }       :End function
                  f1     :First integer >=1 that returns a falsey value (i.e, 0) when passed through that function

Perl 5 -p, 48 bytes
$\++;($_-=4*(!($\%3)+!($\%5))||length$\)&&redo}{

Try it online!

C (gcc), 68 bytes, stdout-spamming

Thanks to H.PWiz for this approach, saving six bytes.

f(n,j,r){for(r=j=0;!r;r=!n*j)n-=++j%3?j%5?printf("%d",j):4:j%5?4:8;}

Try it online!

C (gcc), 74 bytes
f(n,j,r){for(r=j=0;!r;r=!n*j)n-=++j%3?j%5?snprintf(0,0,"%d",j):4:j%5?4:8;}

Try it online!

05AB1E, 17 bytes
Lε35SÖ4*OygM}.¥sk

Try it online or verify all test cases.
Explanation:
L          # Create a list in the range [1, (implicit) input]
           #  i.e. 15 → [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
 ε         # Map each value to:
  35S      #  Push 35 as digit list: [3,5]
     Ö     #  Check if the current value is divisible by these (1 if truthy; 0 if falsey)
      4*   #  Multiply both by 4
        O  #  And take the sum of that
           #   i.e. 2 → [0,0] → [0,0] → 0
           #   i.e. 9 → [1,0] → [4,0] → 4
           #   i.e. 10 → [0,1] → [0,4] → 4
           #   i.e. 15 → [1,1] → [4,4] → 8
  yg       #  Push the current value again, and pop and push it's length
           #   i.e. 2 → 1
           #   i.e. 15 → 2
  M        #  And then push the largest value on the stack
           #   i.e. 0 and 1 → 1
           #   i.e. 8 and 2 → 8
 }.¥       # After the map: undelta the list (starting from 0)
           #  i.e. [1,1,4,1,4,4,1,1,4,4,2,4,2,2,8]
           #   → [0,1,2,6,7,11,15,16,17,21,25,27,31,33,35,43]
    sk     # Swap to get the (implicit) input, and get its 0-based index in the list
           #  i.e. 15 → 6
           # (after which the result is output implicitly)

Python 3 (79 bytes)
f=lambda s,n=0,l=0:l-len(s)and f(s,n+1,l+(4*(n%3//2+n%5//4)or len(str(n))))or n

Python 2 (74 bytes)
f=lambda s,n=0,l=0:l-len(s)and f(s,n+1,l+(4*(n%3/2+n%5/4)or len(`n`)))or n

Python 3.8 (86 bytes)
f=lambda s:len(s.rpartition("z")[2])/len(str(n:=max(s.count("F")*3,s.count("B")*5)))+n

This exploits the fact that after the last "Fizz" or "Buzz", all the following integers have the same number of digits.
Try it Online

Thunno, \$ 29 \log_{256}(96) \approx \$ 23.87 bytes
Re1+Ax35d%.!S4*xdL~Ez(A$sAh1+

Port of Jonathan Allan's Jelly answer.
Explanation
           # Implicit input
Re         # Loop through range(0, input):
  1+Ax     #   Add one and store in x without popping
      35d  #   Pair [3, 5]
%.!        #   Check for divisibility
   S4*     #   Multiply the sum by 4
      xdL  #   Get the length of the digits of x
~          #   Do a logical or
 E         # End the loop
  z(       # Get the running sums of the list
    A$     # Push the input
      sAh  # Get the index of this in the running sums
1+         # And add one to account for Thunno's 0-indexing
           # Implicit output

Screenshot


text:
Calculate ELO Rating Expected Score
Your task is to calculate the expected chance of winning for 2 players in some game, each with their own ELO Rating. Player A has ELO Ra and player B has ELO Rb
The expected score for Player A (Ea) is: 1 / (1 + 10(Rb - Ra) / 400). There is a similar equation for Player B (Eb): 1 / (1 + 10(Ra - Rb) / 400).
If you want a more copiable version: 1 / (1 + 10^((a-b) / 400))
Ea + Eb should be equal to 1.
Therefore, the score for a player is their expected chance of winning some match, in decimal.
Your program/function should take 2 inputs, Player A's ELO, and Player B's ELO, and print/return their respective chance to win in decimal format. The output must add up to one, and you must be accurate to at least 5 decimal places (0.00000). After 5 decimal places, you may have inaccurate digits, provided the two outputs still add up to one.
Examples:
1200 2100 -> 0.005591967 0.994408033
1 1 -> 0.5 0.5
60 20 -> 0.557312 0.442688
9999 9998 -> 0.501439 0.498561
9999 1 -> 0.999999 0.000001

In the final test case, some answers use scientific exponentiation to represent the value. This is not valid.
You can see in test case 3 here that 0.557312 is not quite accurate, because the 2 should be a 1, but this is fine because it is after five decimal places and the outputs still add up to one.
This is an example of invalid output:
9999 9998 -> 0.5014391117091516, 0.49856088829084844

This looks like it satisfies the requirements at first glance, but the numbers add up to 1.00000000000000004 and therefore the output is not valid.
Trailing zeroes in the output is fine.
You may assume a player's ELO will always be greater than 0, and nobody will have an ELO higher than 9999.
The input and output format is flexible, but the input and output must still be in base 10.
As this is code-golf, the answer with the lowest byte count will win!

+1 for ELO rating, even though I was disappointed to find you are talking about something called Elo rating instead.

You should also add the test case [9999, 998] which most answers seem to fail for.

@Emigna added, but made it more extreme ;)

@Okx: Nice. Need to go back to the drawing board to handle that one :)

It seems all answers fail on 9999, 1 including my own, so I can't post it :-(

In fact, I think your example case is invalid: http://i.imgur.com/aMj7pjG.png

Jelly, 9 bytes
÷400⁵*÷S$

Try it online! or View all test cases.
The input is an array [Ra, Rb] and the output is an array [Ea, Eb].
Explanation
÷400⁵*÷S$  Input: array [Ra, Rb]
÷400       Divide each by 400, makes [Ra/400, Rb/400]
    ⁵*     Raise 10 to that power, makes [10^(Ra/400), 10^(Rb/400)]
        $  Monadic chain operating on previous result
      ÷      Divide each by
       S     The sum of the whole
           Makes [10^(Ra/400)/(10^(Ra/400) + 10^(Rb/400)),
                  10^(Rb/400)/(10^(Ra/400) + 10^(Rb/400))]
               = [1/(1 + 10^((Rb-Ra)/400)), 1/(1 + 10^((Ra-Rb)/400))]

What is going on here?

@Okx That is scientific notation. I'm sure you know what it is since you just edited the challenge to require standard notation after you originally said input/output format were up to us.

Did you look at the other output? It's 1.0!

Python 3, 55 47 bytes
lambda a,b:[1/(1+10**(x/400))for x in[b-a,a-b]]

-8 bytes thanks to @math_junkie

Why not use a for comprehension: 1/(1+10**(x/400))for x in [b-a,a-b]

@math_junkie It's called a "list comprehension"

MATL, 11 bytes
10i400/^ts/

Takes input as a list and outputs a list.
10       % push number literal
i        % push input
400      % push number literal
/        % divide the list (by 400)
^        % power (10^list, element wise)
t        % duplicate the list
s        % sum the second one
/        % divide by the sum
         % (implicit) convert to string and display

JavaScript (ES7), 41 35 bytes
Saved 6 bytes thanks to @Neil
a=>b=>[b=1/(1+10**((b-a)/400)),1-b]

Since Ea + Eb = 1, just write a=>b=>[b=1/(1+10**((b-a)/400)),1-b].

@Neil Really? I'm so shortsighted :P Thanks!

CJam, 23 bytes
XAq~_W%\.m400df/f#:)f/p

Some other 23 byte solutions:
q~_W%\.m400df{/A\#)W#}p
Aq~_W%\.m400df/f{#)W#}p

Try it online!
Explanation
X                        Push 1
 A                       Push 10
  q~                     Push an eval the input, a list containing 2 numbers
    _W%                  Duplicate the list and reverse it
       \                 Swap top stack elements, so the order of answers matches the input
        .m               Vectorized subtraction: computes Ra - Rb and Rb - Ra
          400d           Push 400.0 (must be a double, otherwise / performs integer division)
              f/         Divide both values by 400
                f#       Raise 10 to the power of both numbers
                  :)     Increment both numbers
                    f/   Divide 1 by both numbers
                      p  Output the list nicely

Fails on 9999, 1 :(

@Metoniem That's odd... it definitely has something to do with rounding issues, or maybe something like how 0.1 + 0.2 = 0.30000000000000004. I'll look into it

it actually looks fine now, ALL answers including Google's calculator return the same result as your code. I'm quite sure the test case is invalid :(

C, 63 bytes
#define M(a,b)1/(1+pow(10,(a-b)/400.)),1/(1+pow(10,(b-a)/400.))

Defines a (rather naive) parameterized macro M, the shortest working approach I could think of but probably still not the shortest. As such, any golfing suggestions are greatly appreciated.
Anyways, this returns 2 floating point values, E_b and E_a, respectively.
Try it online!

Fails on 9999, 1

@Metoniem Yup. Most likely has to do with how C rounds floats. :/ I'm looking into it.

It actually seems to be correct, the test case might be invalid :(

Suggest exp10(x) instead of pow(10,x)

SAS Macro Language, 70 bytes
%macro e(a,b);data t;p=1/(1+10**((&b-&a)/400));q=1-p;proc print%mend;

Output is a SAS data set where variables p and q are the players' chance of winning. 11 bytes can be saved by removing the print procedure.

C#, 92 bytes
Not the shortest, but it's C#, never the shortest..
Golfed
   static double[]f(int a,double b){b=1/(1+System.Math.Pow(10,(a-b)/400d));return new[]{1-b,b};

Ungolfed
static double[] f(int a, double b)
{
    b = 1/(1 + System.Math.Pow(10, (a - b)/400d));
    return new[] {1 - b, b};
}

q, 26 bytes
{1%1+10 xexp(y-x;x-y)%400}

Example
q){1%1+10 xexp(y-x;x-y)%400}[1200;2100]
0.0055919673088347735 0.99440803269116518


text:
Efficient counting
When I was a kid, and wanted to count the dollar bills in my life savings, I would count out loud:

one, two, three, four, five, six, seven, eight, nine, ten;
  eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen, twenty;
  twenty-one, twenty-two, twenty-three, twenty-four, twenty-five...

Eventually I got tired of pronouncing each of these multi-syllable numbers. Being mathematically minded, I created a much more efficient method of counting:

one, two, three, four, five, six, seven, eight, nine, ten;
  one, two, three, four, five, six, seven, eight, nine, twenty;
  one, two, three, four, five, six, seven, eight, nine, thirty...

As you can see, I would only pronounce the digit(s) that have changed from the previous number. This has the added advantage that it's considerably more repetitive than the English names for numbers, and therefore requires less brainpower to compute.
Challenge
Write a program/function which takes in a positive integer and outputs/returns how I would count it: that is, the right-most non-zero digit and all trailing zeroes.
Examples
   1    1
   2    2
  10   10
  11    1
  29    9
  30   30
  99    9
 100  100
 119    9
 120   20
 200  200
 409    9
1020   20

A full list of test-cases shouldn't be necessary. This is A274206 on OEIS.
Rules

Your entry must theoretically work for all positive integers, ignoring precision and memory issues.
Input and output must be in decimal.
You may choose to take input and/or output as a number, a string, or an array of digits.
Input is guaranteed to be a positive integer. Your entry can do anything for invalid input.

This is code-golf, so the shortest code in bytes wins.

So does "in decimal" include a list of decimal digits, like [1,0,2,0] -> [2,0] for the last test case? (I'm unclear on the phrase "single-item array").

@JonathanAllan By "single-item array" I meant an array that contains a single number or string which represents the integer. I didn't think allowing arrays of digits was a good idea, but now it kind of seems like an arbitrary restriction since strings are allowed (and strings are very similar to arrays in many languages). So I'll allow an array of digits unless there's a good reason not to.

Dang it, you stole my secret :P

I think almost everyone counted like this as a kid. ;) At least I did as well. :)

@KevinCruijssen "as a kid"?

@MartinEnder Hehe, ok, maybe everyone still counts like this. ^_^

Python 2, 28 bytes
f=lambda n:n%10or 10*f(n/10)

Try it online!
A recursive formula works out very cleanly. If the last digit is nonzero, output it. Otherwise, remove the final zero, compute the output for that, and multiply it by 10.

Jelly, 6 3 bytes
-3 bytes by having I/O as a decimal list of digits.
ṫTṪ

Test suite at Try it online!
How?
ṫTṪ - Main link: listOfDigits  e.g.  [1,    0,    2,    0]  or [1,      1,    9  ]
 T  - truthy indexes                 [1,          3      ]     [1,      2,    3  ]
ṫ   - tail (vectorises)              [[1,0,2,0],  [2,0]  ]     [[1,1,9],[1,9],[9]]
  Ṫ - tail pop                                    [2,0]                       [9]

If we could not take decimal lists a 6 byter is:
DµṫTṪḌ

Which you can see here.
This does the same thing, but converts an integer to a decimal list beforehand and converts back to an integer afterwards.

As I was scrolling past the first few answers, I said to myself, "I bet there's a 3-byte Jelly solution..."

C, 30 29 27 bytes
Proud of this as I abuse two C exploits to golf this up (described at end of post); This is specifically for C (GCC)

3) b=10;f(a){a=a%b?:b*f(a/b);}//27 bytes
2) b;f(a){b=a=a%10?:10*f(a/10);} //29 bytes
1) f(i){return i%10?:10*f(i/10);} //30 bytes
Try it online (27 byte version)

First attempt (30 bytes): Abuses the fact that in GCC if no value is declared in ternary, the conditional value will be returned. Hence why my ternary operator is blank for the truth return value.
Second attempt (29 bytes): Abuses memory bug in GCC where, as far as I understand, if a function has no return value, when more than two variables have been meaningfully utilized in the function, the last set value of the first argument variable will be returned.
   (Edit: but this "set value" must set in certain ways, for example setting a variable with = or += works but setting it with %= does not work; weird)
Third attempt (27 bytes): Since I must meaningfully utilize the second variable (b) anyways to properly abuse the memory bug mentioned above, I may as well use it as an actual variable for "10" for substitution.
   (Note: I should be able to swap a=a%b with a%=b to save another byte but unfortunately this causes the memory bug exploit above to stop "working", so I can't)

You might want to add "GCC" to the title of your answer since it's GCC-specific (it doesn't work on clang). Also, the "memory bug" is probably just undefined behavior that happens to work due to the specific stack frame layout that GCC uses. It probably doesn't work on other platforms, even with GCC.

@gurka Done, thanks

Retina, 7 6 bytes
!`.0*$

Try it online (all test cases)
Output matches of a digit followed by any zeros at the end of the input string. Though not required, this also happens to work for 0.

Huh, I had figured [1-9] (or [^0]) would be necessary instead of \d. I guess the greediness of * ensures the correct output every time.

@ETHproductions This has nothing to do with the greediness of * but with the fact that matches are searched for from left to right. \d0*?$ would also work.

using the regex .0*$ should work

If there's a (short enough) way to output only the last match, you could use .0*

@12Me21 The only way to do that is to only match the last occurrence, or to use a replace or something. It won't be shorter.

@12Me21 specifically, you'd need -1= in front of the ```.

Cubix, 18 32 bytes
I think I'll have to spend sometime on this later and see if I can compress it a bit.  But for the moment here it is.
Turns out I was thinking about this totally the wrong way. Now the process incrementally applies a mod (1,10,100,1000,...) to the input integer and prints out the first one which isn't zero.  Bit more boring, but shorter.
!N%*I1^\.u;u@O\;;r

Try it here
    ! N
    % *
I 1 ^ \ . u ; u
@ O \ ; ; r . .
    . .
    . .

Always nice to see a Cubix answer :)

@obarakon Got an improved one to put up soon.  Really did this one the wrong way

Javascript 19 18 bytes
Thanks to ETHproductions for golfing off one byte and Patrick Roberts for golfing off two bytes
x=>x.match`.0*$`

Returns an array of strings that match the regex of being at the end of the input string with any character followed by the largest possible number of zeroes.
Try it Online

I don't think you need the g, as there's only ever one match to find.

Save 2 bytes by using x=>x.match`.0*$`

JavaScript, 21 bytes
f=n=>n%10||10*f(n/10)

Test cases

f=n=>n%10||10*f(n/10)

console.log(f(1   )); //  1
console.log(f(2   )); //  2
console.log(f(10  )); //  10
console.log(f(29  )); //  9
console.log(f(99  )); //  9
console.log(f(1020)); //  20

Brachylog, 2 bytes
a₁

Try it online!
The suffix builtin a₁, for integers, is implemented as:
brachylog_adfix('integer':1, 'integer':0, 'integer':0).
brachylog_adfix('integer':1, 'integer':I, 'integer':P) :-
    H #\= 0,
    H2 #\= 0,
    abs(P) #=< abs(I),
    integer_value('integer':Sign:[H|T], I),
    integer_value('integer':Sign:[H2|T2], P),
    brachylog_adfix('integer':1, [H|T], [H2|T2]).

Brachylog likes to be able to treat integers as lists of digits, and for that it uses the custom utility predicate integer_value/2. The interesting thing about integer_value/2 here is that since it has to be able to correctly translate a digit list with leading zeros, it ends up also being able to translate an integer to a digit list with leading zeros, so predicates that don't want that to happen (most of them, especially the nondet ones like a) forbid the heads of their digit lists from being 0. So, while a₁ generates suffixes shortest first for lists and strings, it skips over any suffix of an integer with a leading 0, which in addition to removing duplicates, also means that the first suffix generated is the rightmost non-zero digit with all trailing zeroes.

Bash + coreutils, 12
grep -o .0*$

Try it online.

Grime, 5 bytes
d\0*e

Try it online!
Explanation
       Find the longest substring of the input matching this pattern:
d      a digit, then
 \0*   zero or more 0s, then
    e  edge of input (which is handled as an Nx1 rectangle of characters).

R, 33 bytes
Implemented as an unnamed function
function(x)rle(x%%10^(0:99))$v[2]

This applies a mod of 10^0 through 10^99.  rle is used to reduce the results down so that the second item is always the result we want.
Try it online!

Brain-Flak, 74 bytes
{({}<>)<>}(()){{}<>(({}<>)[((((()()()){}){}){}){}]<(())>){((<{}{}>))}{}}{}

Try it online!
Only prints the last non-0 and all trailing 0s.
Explanation:
{({}<>)<>}                    # Move everything to the other stack (reverse the input)
(())                          # Push a 1 to get started
{                             # do...
  {}<>                        #   pop the result of the equals check (or initial 1)
  (                           #   push...
    ({}<>)                    #     the top value from the other stack (also put this on the stack)
    [((((()()()){}){}){}){}]  #     minus the ASCII value of 0
    <(())>                    #     on top of a 1
  )                           #   close the push
  {                           #   if not zero (ie. if not equal)
    ((<{}{}>))                #     replace the 1 from 3 lines back with a 0
  }{}                         #   end if and pop the extra 0
}                             # while the copied value != "0"
{}                            # pop the result of the equals check

Vim, 19 bytes
Two versions, both 19 bytes:
:s/\v.*([^0]0*)/\1
:s/.*\([^0]0*\)/\1

Plus a trailing carriage return on each.
Verify all test-cases online! (One byte added to test on multiple lines)

TI-Basic, 18 bytes
If fPart(.1Ans
Return
Ans.1
prgmA
10Ans

Zsh, 18 16 bytes
<<<${(M)1%[^0]*}

Try it online!
Try it online!
Bash, 25 20 bytes
-5 bytes by @roblogic
echo ${1#${1%[^0]*}}

Try it online!
Try it online!
---
Shells need to call external programs to use regex, so we have to make do with globbing.
The ${1%[^0]*} expansion matches the shortest suffix beginning with a nonzero character, and removes it.

In Zsh, adding the (M) flag causes the matched suffix to be kept instead of removed.
In Bash, the ${1%  } expansion removes as a prefix whatever is left.

20 bytes in bash: echo ${1#${1%[^0]*}}

Perl 5, 12 bytes
11, plus 1 for -nE instead of -e
say/(.0*$)/

GNU sed, 17 14 + 1(r flag) = 15 bytes
Edit: 2 bytes less thanks to Riley
s:.*([^0]):\1:

It works by deleting everything until the right-most nonzero digit, which is then printed along with any existing trailing zeros. The script can handle multiple tests in one run, each on a separate line.
Try it online! (all test examples)

MATL, 10 7 bytes
3 bytes saved thanks to @B. Mehta!
tfX>Jh)

Input and output are an array of digits.
Try it online!
Or verify all test cases.
Explanation
t     % Input string implicitly. Duplicate
f     % Push indices of non-zero digits
X>    % Keep maximum, say k
Jh    % Attach 1j to give [k, 1j]. This is interpreted as an index "k:end"
)     % Index into original string. Display implcitly

Since we're allowed to take input and output as a vector of integers, you can remove the 48- entirely, saving 3 bytes: Try it online!

Mathematica, 26 bytes
Pure function which takes a list of digits and outputs a list of digits:
#/.{___,x_,y:0...}:>{x,y}&

Explanation
#                           First argument
 /.                           Replace
   {                              start of list followed by
    ___,                          zero or more elements followed by
        x_,                       an element (referred to later as x) followed by
           y:0...                 a sequence of zero or more 0s (referred to later as y) followed by
                 }                end of list
                  :>            with
                    {x,y}         {x,y}
                         &   End of function.

This works since it finds the leftmost match for x, which must be the rightmost nonzero element of the list since it is followed by a sequence of zero of more 0s and then the end of  the list.

Java 8, 47 bytes
this is a lambda expression assignable to a IntUnaryOperator:
x->{int m=1;for(;x%m<1;m*=10);return x%m*m/10;}

explanation:
multiply m by 10 until x%m is not 0.
return x%m*m/10 requires the division because m is an order of magnitude more than the desired result.

Perl 6, 10 bytes
{+m/.0*$/}

Trivial regex solution. Inputs and outputs a number.

C#, 30 28 bytes
Based on this JavaScript answer, so I suppose all the credits kinda go to him.
Golfed
i=a=>a%10<1?10*i(a/10):a%10;

-2 bytes by removing () around a thanks to Emigna

I think you need to explicitly name the function i for this to work as you're using recursion.

@Emigna you're right! I totally missed that :(

Updated it but I'm not 100% sure if it's correct this way

I don't know the consensus on this in C#. That syntax is valid, but will only work if the delegate has already been declared (otherwise i will be undeclared for the recursive call).

The parenthesis around a is not required either way though.

@Emigna Really? I'm just new to using lambdas/anonymous functions so I'm not sure yet haha, thanks!

05AB1E, 9 bytes
RD0Ê1k>£R

Try it online!
or as a
Test suite
Explanation
R          # reverse input
 D         # duplicate
  0Ê       # check each for inequality with 0
    1k     # get the index of the first 1
      >    # increment
       £   # take that many digits from the input
        R  # reverse

Try it online! - 6 bytes

Or 5 - Try it online!

@MagicOctopusUrn: That's only checking the last digit. It should be the last non-zero digit and all after.

J, 27 bytes
10&|`(10*(p%&10))@.(0=10&|)

It's based off of xnor's formula, so credits to him.

Kotlin, 49 bytes
lambda, assignable to (List<Int>) -> List<Int>
{a->a.slice(a.indexOfLast{it in 1..9}..a.size-1)}

implicit parameter name it in indexOfLast
.. for building ranges

Japt, 6 bytes
f".0*$

Try it online!

Stax, 5 bytes
æΩ$3╚

Run and debug it
Procedure:

Calculate "multiplicity" by 10.  (That's the number of times 10 evenly divides the input)
Add 1.
Keep that many characters from the right of (the input as a string).

05AB1E, 4 bytes
ĀÅ¡θ

I/O as a list of digits.
Try it online or verify all test cases (test suite contains a join for better readability).
Explanation:
Ā     # Python-style truthify each digit in the (implicit) input-list (0 if 0; 1 if [1-9])
      #  i.e. [9,0,4,0,3,0,0] → [1,0,1,0,1,0,0]
 Å¡   # Split the (implicit) input-list on truthy values (1s)
      #  i.e. [9,0,4,0,3,0,0] and [1,0,1,0,1,0,0] → [[],[9,0],[4,0],[3,0,0]]
   θ  # And only leave the last inner list
      #  i.e. [[],[9,0],[4,0],[3,0,0]] → [3,0,0]
      # (after which it is output implicitly as result)

Thunno 2 t, 3 bytes
V€ỵ

Try it online!
Port of Jonathan Allan's Jelly answer.
Explanation
V€ỵ  # Implicit input
V    # Truthy indices
 €ỵ  # Head remove over each
     # Take the last item
     # Implicit output

Desmos, 62 bytes
Input (variable A) and output (variable B) are both arrays of digits. Run the ticker to start the program.
Ticker:
B->join(A[n],B),n->\left\{A[n]=0:n-1,0\right\}

Expression List:
B=[]
n=A.length

Try it on Desmos!
Scans A from right to left until a nonzero digit is encountered. Afterwards, set n=0 to invalidate the action and halt the program.

34 bytes

BTW welcome to Code Golf! I don't see Desmos answers often from people other than me, so it's always exciting to see other people golfing in Desmos!

That being said, if you would like to learn more about various Desmos golfing tips, please check out the Tips for Golfing in Desmos page, or check out some of my Desmos answers to see some of the tricks I use. I hope you will do more Desmos golfing in the future!

@AidenChow Thanks! I started writing programs in Desmos last summer and eventually I realized that I could try golfing in Desmos after looking for something new to keep myself busy on. I just finished turning my brainfuck interpreter to plaintext so now I'll have to read those tips and optimize it again haha

Sounds cool! If you don't mind, could I take a look at your brainfuck interpreter (and the plaintext you have)? Maybe I can try helping you golf it.

Sure thing! In terms of LaTeX, I think I've managed to cut everthing down except for the c action, which keeps failing when I get rid of the \left and \rights. For the syntax, on the other hand, I've done what I could but it's probably still suboptimal.

In case the golfed names are too confusing, if you look at the link at the top of the expressions list, you will find an annotated copy of the interpreter with names that perhaps make more sense. (I originally wrote this interpreter last week so golfing it was a bit of an afterthought)

Let us continue this discussion in chat.

Rust, 34 bytes
|n|n[n.rfind(|d|d!='0')?..].into()

If I knew a way to use impl traits on closures, I could remove 7 bytes from .into(), but It doesn't seem like that's allowed on fn pointers or Fn objects.
Rust Playground

Vyxal, 3 bytes
Ttȯ

Try it Online!
Port of Jelly.
Explained
Ttȯ
T    # Truthy indices of the input.
 t   # Last item of that
  ȯ  # input[that:]

Created with the help of Luminespire.

J, 11 bytes
}.~_1{I.@:*

Port of Jelly. Takes a digit list.
Attempt This Online!
}.~_1{I.@:*
      I.@:*  NB. indices of positive numbers
   _1{       NB. tail
}.~          NB. drop that many items

Haskell, 38 bytes
x!d|m<-mod x d,m>0=m|e<-10*d=x!e
(!10)

Try it online! Usage: (!10) 1020 yields 20.
Explanation:
x!d is a recursive formula which computes x modulo d with initially d=10. If the result is larger zero it is returned, otherwise recursively x!(10*d) is called.
Other approaches: (39 bytes)
x!d|m<-x`mod`10^d,m>0=m|e<-1+d=x!e;(!1)
f x=[y|y<-[x`mod`10^e|e<-[1..]],y>0]!!0
f x=[y|y<-map(mod x.(10^))[1..],y>0]!!0

Pyke, 13 11 10 bytes
`1QY0mN%e>

Try it here!
  QY       -     digits(input)
    0mN    -    map(^, i != 0)
 1     %   -   indecies(^, i == 1)
        e  -  ^[-1]
`        > - str(input)[^:]

11 bytes:
`D\0mN1R%e>

Try it here!
13 bytes:
`D\0mN_1R@_t>

Try it here!

Haskell 57 Bytes
f(x:s)a|x=='0'=f s$'0':a|1>0=x:a
t x=f(reverse.show$x)[]

Input    -> Output
t 120    -> "20"
t 30200  -> "200"

Batch, 88 bytes
@set/ps=
@set z=
:l
@if %s:~-1%==0 set z=0%z%&set s=%s:~,-1%&goto l
@echo %s:~-1%%z%

Takes input on STDIN.

Ruby, 14 bytes
->n{n[/.0*$/]}

Input is a string (allowed by the rules)

Java 8, 33 bytes
s->s.replaceAll(".*?(.0*)$","$1")

I/O as a String.
Try it online.
Explanation:
s->                         // Method with String as both parameter and return-type
  s.replaceAll(".*?(.0*)$", //  Replace all occurrences of this match,
               "$1")        //  with this replacement

Regex explanation:
.*?(.0*)$                   // MATCH:
.*?                         //  Zero or more optional characters
                            //  (the optional is used to give other 0+ matches
                            //   higher priority/precedence)
    .                       //  Followed by any character
     0*                     //  Followed by zero or more literal 0s
        $                   //  At the end of the string
   (   )                    //  And capture those non-optional characters in capture group 1

$1                          // REPLACEMENT:
                            //  The content of capture group 1, which basically removes
                            //  the optional characters outside the capture group