# Questions tagged [number]

A competition to solve a particular problem through the usage and manipulation of numbers.

1,179 questions
Filter by
Sorted by
Tagged with
632 views

### A Multipurpose Quine

I personally love quines, but they all seem to be so... static. So why not create a quine that can do more. Challenge The challenge here is to create a quine that without any sort of input is a ...
764 views

### Trapped Knight Sequence

Introduction Inspired by the very recent video The Trapped Knight - Numberphile, I came up with a challenge. The trapped knight sequence is a finite integer sequence of length 2016, starting from 1, ...
1k views

### Spot all (anti)diagonals with duplicated values

Challenge: Given a matrix input, determine the amount of diagonals and anti-diagonals with duplicated numbers. So if we have a matrix like this: ...
557 views

### Prime Difference [duplicate]

Given an integer n, output the smallest prime such that the difference between it and the next prime is at least n. For example, if n=5, you would output ...
234 views

### Work out $x^y$ using only addition and subtraction [duplicate]

The challenge is to implement a function or program that takes two numbers, $x$ and $y$ and return the result of $x^y$. The program cannot use any other mathematical operation other than $+$ ...
3k views

### Matrix Jigsaw Puzzles

Input: An integer n Two equal-sized square matrices (with their width/height being a multiple of n) Output: One of two ...
2k views

### Enumerate each series of identical numbers in-place

Given a list of strictly positive integers, go through each distinct number and replace all occurrences of it with successive indices (zero or one based) of a new series. Examples ...
607 views

### Mis-decode a date

Background Inspired by a now deleted question by John Burger from which I quote: Now obviously no human made this mistake. It's a mis-decode of something - perhaps the ISBN? My question is: ...
522 views

### Surreal Numbers

Surreal Numbers are one way of describing numbers using sets. In this challenge you will determine the value of a surreal number. Intro A surreal number consists of two sets: a left and right. The ...
363 views

### Approximate the proportion of integers with neighboring factors

If 1 is not counted as a factor, then 40 has two neighboring factors (4 and 5) 1092 has two neighboring factors (13 and 14) 350 does not have two neighboring factors (out of its factors 2, 5, 7, 10, ...
93 views

### Sino-Korean numerals [duplicate]

The Korean language has two sets of numerals, a native Korean numerals and Sino-Korean numerals. The native Korean numerals are mostly used for numbers under 100, such as age and time. The Sino-...
3k views

### Convert to Suzhou numerals

Suzhou numerals (蘇州碼子; also 花碼) are Chinese decimal numerals: 0 〇 1 〡 一 2 〢 二 3 〣 三 4 〤 5 〥 6 〦 7 〧 8 〨 9 〩 They pretty much work like Arabic numerals, except ...
227 views

### Round the digits last digit, over and over

Challenge: Given two inputs, x and y, round x to one less significant figure, then repeat until it has y number of unrounded digits left. (the decimal point does not count as a digit) Input & ...
703 views

### Satisfying Rounding

Satisfying Rounding You know when you're in science class, and asked to round to 2 sig figs, but your answer is 5.2501...? You should round to ...
4k views

### Golf a number bigger than Loader's number

As a follow up to Shortest terminating program whose output size exceeds Graham's number and Golf a number bigger than TREE(3), I present a new challenge. Loader's number is a very large number, ...
1k views

### Self-contained powers

Given integer n, output the smallest exponent e greater than 1 such that n^e contains ...
5k views

### Print all lexicographically increasing numbers under 10000

A lexicographically increasing number is an integer whose digits are in strictly increasing order. Print all lexicographically increasing numbers under 10000. Here are lines of the expected output: ...
161 views

### Number letter counts [closed]

If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. Output how many letters would be used if all the numbers from ...
1k views

### Largest Number in Brainfuck BigInt for each program length up to 50 instructions

This challenge is for the largest finite number you can get BrainFuck programs of given lengths to contain in memory. We must use one of the BF versions that uses big integers for the cells rather ...
2k views

### Sort by Largest Digit(s)

Challenge: Given a list of integer, sort descending by their single largest digit(s). The order for numbers with the same largest digit are then sorted by second largest digit, etc. We ignore ...
2k views

### Upward and onward to greater glory!

May this challenge serve as (another) tribute to Stan Lee, who passed away aged 95. Stan Lee has left us an invaluable legacy and a peculiar catch word: Excelsior. So here's a small challenge based ...
1k views

### Through Space and Time

Introduction: In general we usually speak of four dimensions: three space dimensions for x, y, and ...
2k views

### Print the Lost numbers

As a big fan of the Lost TV series, I always got intrigued by the sequence of numbers that repetitively appears on the episodes. These numbers are: $4, 8, 15, 16, 23, 42$ (A104101) Using any ...
542 views

### Fastest algorithm to output array containing all integers in range excluding duplicate digits

Input is a single integer in ascending digit order. The only valid inputs are: 12 123 1234 ...
857 views

### Decimal Digit Truncating

Input: A decimal Output: The input truncated How to truncate them? The integer part of the input will remain the same. The decimal part of the input will be truncated based on the lowest digit in ...
162 views

### Seeking Substantial Subcollections

(thanks to @JonathanFrech for the title) Challenge Write a program or function that, given a collection of positive integers $S$ and a positive integer $n$, finds as many non-overlapping ...
114 views

### Minimum 1's to get 1-expression for n [duplicate]

Background Challenge is inspired by this question. The 1-expression is a formula that in which you add and multiply the number 1 any number of times. Parenthesis is allowed, but concatenating 1's (e....
419 views

### Array indexes to number and number reversed

Given an input array having minimum length 2 and maximum length 9 having any initial values output an array having length ...
9k views

Your network scanning tool is annoyingly picky about input, and immediately crashes if you feed it an IPv4 address that contains improper characters or isn't properly formatted. An IPv4 address is a ...
9k views

### List all possible titles for the Anno games

In the Anno video game series there are 6 games with a 7th one announced for early 2019. Their titles always feature a year in a specific pattern: ...
2k views

80 views

### Concatenate 2 numeric type values to a fixed size number [closed]

You have 2 numbers, both stored separate as numeric data type. First number is always 6 digits long. Second number can vary between 1 and 4 digits. If it's less than 4 digits, it needs to be padded ...
989 views

### Multiply and Divide

Given a value x find the smallest numerical value greater than y that is capable of being multiplied and divided by x while retaining all original digits. The new numbers do not lose digits. The new ...
4k views

### Longest Repeating Subsequence of a Single Digit

Challenge: Given a positive integer, output the longest single-digit subsequence that occurs at least twice, AND has boundaries of another digit (or the start/end of the integer). An example: Input: <...
5k views

142 views

### Make n n n n = x [duplicate]

Background So I've been inspired by this puzzleing SE question to create a similar Code Golf challenge. The basic puzzle format is you must use 4 numbers, such as 5 5 5 5, to equal some other number, ...
795 views

### Make the biggest and smallest numbers

Inspired by this post over on Puzzling. Spoilers for that puzzle are below. Given three positive integers as input, (x, y, z), construct the inclusive range ...