3 ms·
Failed to realize doge prime was supposed to only count prime-numbered wows until after looking at the game's code. From the game's script: function isFibon
by RA2lover 2y ago
Failed to realize doge prime was supposed to only count prime-numbered wows until after looking at the game's code.
From the game's script:
function isFibonacci(numberToCheck) {
return (
isSquare(5 * numberToCheck * numberToCheck + 4) ||
isSquare(5 * numberToCheck * numberToCheck - 4)
)
}
How does that end up working for all numbers?
- keepamovin 2y agoLooks like a quadratic residue check for primes, or just a residue check But passing to ChatGPT reveals it is in fact a test for if the number is a Fibonacci number