Pyth, 16 bytes
.^RtJ^2yTyJ%2S97
Try it online!
This solution uses Euler's formula, which states that if a is coprime to m,
a^(phi(m)-1) = a^-1 mod m
where phi(m) is the totient function, t...
Pyth, 6 bytes
+!-Q2s
Try it online!
I think there might be a way to shave a byte, but I can't find it.
s Sum the input
+ Add
-Q2 Remove the twos from the input
! Nega...
Pyth, 25 23 bytes
@f-1aM.:jT;2u+Gs>2GyQU2
Try it online!
First, we generate the Fibonacci numbers:
u+Gs>2GyQU2
U2 range(2), the list [0, 1]
u Apply the follow...
Pyth, 15 bytes
!f.A-VtTsM._T.p
Try it online!
Outputs True if no valid recipe exists, False if one does. If truthy/falsy outputs are allowed, the ! can be removed, to just output all valid per...
Pyth, 8 bytes
qu/Red._
Try it online!
A list is in a loop if and only if it is the first list seen twice as f is applied repeatedly.
qu/Red._
u Apply the following function,
...