Linked Questions
17 questions linked to/from Division and remainder
74
votes
97
answers
7k
views
Is the number binary-heavy?
An integer is binary-heavy if its binary representation contains more 1s than 0s while ignoring leading zeroes. For example 1 is ...
46
votes
146
answers
6k
views
Full Width Text
Full width text is text that has a space after every character, including the last one. For instance, the first sentence of this question becomes:
...
49
votes
92
answers
8k
views
Is this number a factorial?
The Task
Given a natural number as input, your task is to output a truthy or falsey value based on whether the input is a factorial of any natural number. You can assume that the input number will ...
28
votes
98
answers
19k
views
Reciprocal of a number (1/x)
Challenge
Given a (floating-point/decimal) number, return its reciprocal, i.e. 1 divided by the number. The output must be a floating-point/decimal number, not just an integer.
Detailed ...
58
votes
70
answers
11k
views
Am I a Fibonacci Number?
Your Task:
Write a program or function to check if a number that is inputted is a Fibonacci number. A Fibonacci number is a number contained in the Fibonacci sequence.
The Fibonacci Sequence is ...
49
votes
71
answers
7k
views
An abundance of integers!
An Abundant number is any number where the sum of its proper divisors is greater than the original number. For example, the proper divisors of 12 are:
...
50
votes
49
answers
7k
views
Tips for golfing in PowerShell
What general tips do you have for golfing in Windows PowerShell? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to PowerShell (e.g. "...
46
votes
56
answers
9k
views
Shift right by half a bit
The challenge is to implement a program or function (subsequently referred to as "program") that takes a nonnegative integer \$n\$ as input and returns \$n\over\sqrt{2}\$ (the input divided by the ...
34
votes
75
answers
3k
views
Modulus Summation
I call this sequence "the Jesus sequence", because it is the sum of mod.</pun>
For this sequence, you take all the positive integers m less than the input n, and take the sum of n modulo each m. ...
35
votes
44
answers
5k
views
Calculate Euler's totient function
Background
Euler's totient
function φ(n) is defined as the number of whole numbers less than or equal to n that are relatively ...
40
votes
32
answers
5k
views
Is it a Proth number?
A Proth number, named after François Proth, is a number that can be expressed as
$$N = k \times 2^n + 1$$
Where \$k\$ is an odd positive integer and \$n\$ is a positive integer such that \$2^n > k\$...
20
votes
27
answers
1k
views
Decompose a number!
Your task is to decompose a number using the format below.
This is similar to base conversion, except that instead of listing the digits in the base, you list the <...
22
votes
19
answers
2k
views
Is this a consecutive-prime/constant-exponent number?
A while ago, I had a look at the prime factorization of 27000:
27000 = 23 × 33 × 53
There are two special things about that:
consecutive-prime: The primes are consecutive: 2 is the 1st prime, 3 is ...
25
votes
9
answers
2k
views
Tips for Golfing in Brain-Flak
Brain-flak is a stack-based turing-tarpit language, written collaboratively between me, DJMcMayhem, and 1000000000.
Some users are very experienced in the mysterious ways of Brain-Flak. So I thought ...
1
vote
52
answers
2k
views
Is it a completely even number?
A completely even number is a positive even integer whose divisors (not including 1) are all even.
Some completely even numbers are:
2 (divisors: 2, 1)
4 (divisors: 4, 2, 1)
16 (divisors: 16, 8, 4, 2,...