25 questions linked to/from Tips for golfing in Julia
44k views

### Fibonacci function or sequence

The Fibonacci sequence is a sequence of numbers, where every number in the sequence is the sum of the two numbers preceding it. The first two numbers in the sequence are both 1. Here are the first ...
• 4,937
19k views

### No A, just CAPS LOCK

What happens when the CapsLock key on your keyboard doesn't have a notch in it? "This hPPENS." The goal of this program is to consistently emulate keyboard misses where each A press is replaced with ...
• 1,851
13k views

### Collatz Conjecture (OEIS A006577)

This is the Collatz Conjecture (OEIS A006577): Start with an integer n > 1. Repeat the following steps: If n is even, divide it by 2. If n is odd, multiply it by 3 and add 1. It is proven that ...
• 71.6k
7k views

### Tips for golfing in Mathematica

What general tips do you have for golfing in Mathematica? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Mathematica (e.g. "remove ...
• 49.3k
10k views

### The Ackermann function

The Ackermann function is notable for being the one of the simplest examples of a total, computable function that isn't primitive recursive. We will use the definition of $A(m,n)$ taking in two ...
• 8,816
4k views

### Output the largest number with the fewest digits

Given a nonempty list of positive decimal integers, output the largest number from the set of numbers with the fewest digits. The input list will not be in any particular order and may contain ...
3k views

### Reversed Iota's

I didn't invent this challenge, but I find it very interesting to solve. For every input number, e.g.: 4 Generate a range from 1 to that number: ...
3k views

### Subtract the next numbers

Description Subtract the next P numbers from a N number. The next number of N is N + 1. Look at the examples to get what I mean. Examples: ...
• 1,137
2k views

### Smallest Bit Rotation

For a given positive integer, try to find out the smallest possible rotation resulted by rotating it 0 or more bits. For example, when the given number is 177, whose binary representation is \\$...
• 35k
3k views

### Turn an Array into a Math Problem

Given a nonempty list of nonnegative integers, consider rewriting it as an arithmetic problem where: A plus sign (+) is inserted between pairs of numbers that ...
3k views

### Find the next 1-sparse binary number

A positive integer N is K-sparse if there are at least K 0s between any two consecutive 1s in its binary representation. So, the number 1010101 is 1-sparse whereas 101101 is not. Your task is to ...
• 391
2k views

### Case Permutation

Who needs to compare things case insensitively when you're able to generate every permutation of uppercase and lowercase? No one! That's the answer. No one does. Your task is to achieve this feat; ...
• 3,195
3k views

### Jimmy these arrays down

My coworker, Jimmy is kinda new to C/C++. He's also kind of a slow learner. Now, to be fair, his code always compiles, but he has some really sloppy habits. For example, everybody knows that you can ...
• 59.4k
4k views

### Female and Male Sequences

This question is probably harder than all of those "generate a sequence of numbers" tasks, because this requires TWO sequences working in unison. Really looking forward to the answers! In his book "...
• 6,990