Ctrl+P again to print, arrows/tab to navigate results, enter to confirm

    Please in order to save solutions and appear on the leaderboards. New here? Check out the Tutorial hole.

    Details

    A pernicious number is a positive number where the sum of its binary expansion is a prime number.

    For example, 5 is a pernicious number since 5 = 1012 and 1 + 1 = 2, which is prime.

    Print all the pernicious numbers from 0 to 50 inclusive, each on their own line.

    External links: OEIS A052294, Rosetta Code, Wikipedia

    Copied
    0 bytes, 0 chars
    Restore solution
    Compiled from AT&T syntax to x86-64 Linux. Use syscalls to write output.
    ctrl + enter or

    Delete Solution

    Are you sure you want to delete your solution(s) for Pernicious Numbers?

    If you have separate bytes and chars solutions then both will be deleted.

    This is irreversible, please backup any code you care about.

    Type I understand and press confirm to continue.