# Smallest integer $n$ such that $\frac{\sqrt{\log_2{n}}}{(\log_2 {\log_2 n})^2} > 1$

Write code that outputs the smallest integer $$\n > 5\$$ such that $$\\frac{\sqrt{\log_2{n}}}{(\log_2 {\log_2 n})^2} > 1\$$. Your code may have at most one digit in its source code. You can use your chosen digit more than once however.

By digits we are only counting the ASCII characters between 0x30 and 0x39 (inclusive).

• @Dingus I had the bound wrong for $n$. Fixed now. Thank you.
– Simd
Dec 9, 2023 at 9:31
• What counts as a digit?
– Neil
Dec 9, 2023 at 12:27
• By digits are we only counting the ASCII characters between 0x30 and 0x39 (inclusive) or any character that resembles a digit? For example, is ⁹²2*‘ a valid Jelly solution? Dec 9, 2023 at 14:04
• @NickKennedy I think that's valid
– Simd
Dec 9, 2023 at 15:10
• The value is equal to ackermann(4, 2) + 4. Dec 10, 2023 at 23:44

# Python, 22 bytes

print(-~2**2**2**2**2)


Attempt This Online!

According to WolframAlpha, the equation $$\\sqrt{\log_2(x)} = \log_2(\log_2(x))^2\$$ has three solutions. Two real numbers around 1 and 5 and a very large integer solution. So what is that large integer solution?

simple transformations on both sides yield $$\log_2(x)^{\frac 1 4} = \log_2(\log_2(x)) \\ 2^{2^{log2(x)^{1/4}}} = x$$ Now, lets substitute $$\y=log2(x)^{1/4}\$$. Note that $$\y\$$ has to be an integer as well. This yields two equations: $$2^{2^y} = x, \quad y=\log_2(x)^{\frac 1 4} \\ 2^{2^y} = x, \quad y^4=\log_2(x) \\ 2^{2^y} = x, \quad 2^{y^4}=x \\ 2^{2^y} = 2^{y^4} \\ 2^y = y^4 \\$$

The only integer solution to this is $$\y=16\$$, leaving us with $$\x=2^{16^4}=2^{2^{2^{2^2}}}\$$. The first integer that satisfies the inequality is $$\x+1\$$.

# R + gmp, 25 bytes

gmp::as.bigz(2)^2^2^2^2+T


Try it at RDRR!

Port of @ovs’ Python answer, so be sure to upvote that one too! R has no native bigint support so this needs the gmp package.

# Vyxal, 29 bitsv2, 3.625 bytes

k₴E›


Try it Online!

Bitstring:

10000100001000010110011010000


Port of the python answer, but without any digits at all.

## Explained

k₴E›­⁡​‎‎⁪⁡⁪⁠⁪⁡⁪‏⁠‎⁪⁡⁪⁠⁪⁢⁪‏⁠‎⁪⁡⁪⁠⁪⁣⁪‏‏​⁡⁠⁡‌⁢​‎‎⁪⁡⁪⁠⁪⁤⁪‏⁠‎⁪⁡⁪⁠⁪⁢⁡⁪‏‏​⁡⁠⁡‌­
k₴E   # ‎⁡2 ** 65536
›  # ‎⁢+ 1
💎


Created with the help of Luminespire.

# JavaScript (Node.js), 21 bytes

-1 thanks to @l4m2

The only (decimal) digit used in the source is 0.

_=>-~(-~0n>>~0xFFFFn)


Try it online!

This computes $$\1+2^{1+65535}\$$

With all the BigInt suffixes and extra parentheses due to a different operator precedence, a direct port of ovs' answer would be 25 bytes:

_=>-~(2n**2n**2n**2n**2n)


Try it online!

• <<-~0xFFFFn => >>~0xFFFFn
– l4m2
Dec 9, 2023 at 12:20

# Wolfram Language(Mathematica), 13 bytes

Try it online!

2^2^2^2^2+2/2


# Charcoal, 8 bytes

Ｉ⊕Ｘ²Ｘ⁴¦⁸


Try it online! Link is to verbose version of code. Explanation:

   ²        Literal integer 2
Ｘ         Raised to power
⁴      Literal integer 4
Ｘ       Raised to power
⁸    Literal integer 8
⊕          Incremented
Ｉ           Cast to string
Implicitly print


10 bytes using only one superscript digit:

Ｉ⊕Ｘ²Ｘ⊗²⊗⊗²


Try it online! Link is to verbose version of code. Explanation: As above, but uses Doubled (⊗) to make 4 and 8 from 2. (A port of @ovs' Python solution would have been 12 bytes.)

# Jelly, 5 bytes

⁹²2*‘


Try it online!

Port of @ovs’ Python answer, so be sure to upvote that one too! The superscript digits are permitted as per reply to comment from @Simd (the OP).

## Explanation

⁹     | 256
²    | Squared
2*  | 2 to the power of this
‘ | +1


succ\$2^2^2^2^2


Try it online!

# Nekomata, 5 bytes

¥:*Ë→


Attempt This Online!

¥:*Ë→
¥       Push 256
:      Duplicate
*     Multiply
Ë    Power of 2
→   Increment


# dc, 12

2dddd^^^^z+p


Try it online!

# Alice, 14 bytes

Try it online!

The trailing new line is required
I'm using a screenshot as the non ascii character gets removed on save

Port of lyxal's solution

Explanation:

2                Pushes 2 on the stack
'0xFFFF         Pushes 65535 on the stack
h             Increment the top of the stack
E            Pop y, pop x, push x^y
h           Increment the top of the stack
/ O @      Output and exit


Same byte count using Ā for $$\256 * 256 = 65536\$$

2'Ā.*Eh/ O @



Try it online!

• Is one of 2 and 0 not an ASCII character?
– Simd
Dec 10, 2023 at 19:56
• @Simd if you are referring to the 0xFFFF in the explanation, I just use it as a placeholder to show the value of the unprintable character, otherwise the other O stands for Output Dec 10, 2023 at 19:58
• Would 𐀀 work instead of h? (Same byte count though.)
– Neil
Dec 11, 2023 at 0:38
• (I see what you mean about 0xFFFF being lost...)
– Neil
Dec 11, 2023 at 0:39
• 𐀀 would not work, I do not think it is a valid Alice instruction. h increments the result by 1 as the desired output is the result of $2^{65536}+1$ Dec 11, 2023 at 1:46

# 05AB1E, 4 bytes

₁no>


Try it online.

Without using the superscript number(s) either, it's still 4 bytes:

žHo>


Try it online.

Explanation:

₁     # Push builtin 256
n    # Square it to 65536

žH    # (or alternatively) Push builtin 65536

o   # Pop and push 2 to the power this 65536
>  # Increase it by 1
# (which is output implicitly as result)


# J, 9 bytes

>:^^:*~2x


Attempt This Online!

>:^^:*~2x
2x    bigint 2
^^:*~      call ^^:* with 2x on both sides:
^:          repeat
^            2^ (2 is the left argument of ^:)
*         2*2 times (the 2s are the left and right arguments of ^:)
the result so far = 2^(2^(2^(2^(2))))
>:           increment


Bonus 10 and 11 bytes:

>:2x^*:#a.
a.    a built-in string containing 256 extended ascii chars
#      length of it (256)
*:       square
2x^         raise 2 to the power of that
>:            increment

>:^/2>.i:2x
i:2x   -2 -1 0 1 2
2>.       apply max(2, x) to each element; 2 2 2 2 2
^/          reduce by ^ from the right; 2^(2^(2^(2^(2))))
>:            increment


# PowerShell Core, 32 bytes

Try it online!

Explanation:

                  1+0xFFFF[!1]     # Calculates 65536
[bigint]::pow(1+1,            )    # Calculates 2^65536
+1  # Increments by 1 and implicitly prints on stdout

• Amazing it has bigint support!
– Simd
Dec 10, 2023 at 20:39

# sclin, 18 bytes

1 1+""S>c1+ ^1+


Try it on scline!

Didn't read the question closely x_x.

• Your code may have at most one digit in its source code. You can use your chosen digit more than once however. Your code has 1, 2, 3, 5, 6. Dec 11, 2023 at 4:57
• ah my bad, will edit Dec 11, 2023 at 16:28