Linked Questions

74 votes
97 answers

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 ...
Mayube's user avatar
  • 11.6k
46 votes
146 answers

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: ...
Jess Smith's user avatar
49 votes
92 answers

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 ...
Arjun's user avatar
  • 5,034
28 votes
98 answers

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 ...
anna328p's user avatar
  • 6,336
58 votes
70 answers

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 ...
Gryphon's user avatar
  • 7,199
49 votes
71 answers

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: ...
DJMcMayhem's user avatar
  • 58.9k
50 votes
49 answers

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. "...
Joey's user avatar
  • 12.9k
46 votes
56 answers

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 ...
Deadcode's user avatar
  • 11.5k
34 votes
75 answers

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. ...
Nissa's user avatar
  • 3,616
35 votes
44 answers

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 ...
jqkul's user avatar
  • 2,272
40 votes
32 answers

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\$...
DJMcMayhem's user avatar
  • 58.9k
20 votes
27 answers

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 <...
Leaky Nun's user avatar
  • 49.6k
22 votes
19 answers

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 ...
wastl's user avatar
  • 3,893
25 votes
9 answers

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 ...
Wheat Wizard's user avatar
  • 96.5k
1 vote
52 answers

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,...
MD XF's user avatar
  • 13.8k

15 30 50 per page