# Questions tagged [integer]

For challenges involving the manipulation of integers.

432 questions
Filter by
Sorted by
Tagged with
2k views

### Rudin-Shapiro sequence

The Rudin-Shapiro sequence is a sequence of $1$s and $-1$s defined as follows: $r_n = (-1)^{u_n}$, where $u_n$ is the number of occurrences of (possibly overlapping) $11$ in the binary ...
2k views

### Monotone sequence beatitude

Provided that the input is a monotone sequence of three or more integers: Output -2 if the sequence strictly decreases. Example: [7,4,3,2] Output -1 if the ...
2k views

Given two natural numbers (less than 100) as input print the sequence of intermediate results obtained when computing the sum of the two numbers using only the following operations1: ...
2k views

586 views

### RADD decomposition of an integer

Introduction The $RADD(n)$ operation is defined as the sum of $n + [$ the number whose decimal representation are the decimal digits of $n$ in reverse order $]$, see A004086. After reversal, ...
505 views

### Find a matrix whose sliding sum is the input

Given a matrix like this: 1 1 3 -2 3 -4 1 -1 1 1 1 0 0 -1 0 0 By taking a 2×2 "sliding sum", where the sum of every 2×2 region of the matrix is ...
1k views

### Carryless factors

Carryless multiplication is an operation similar to binary long multiplication, but with XOR instead of addition: ...
2k views

### Carry-less sum given a base b

Given a list of positive integers $\mathcal I=I_1,I_2,I_3,...,I_n$ and a base $b>1$ return their "carry-less sum", i.e. represent $\mathcal I$ in base $b$ and sum digit-by-digit ...
1 vote
212 views

### Find number components with lowest distribution

Let us assume that we have number X. Let us assume that we have positive integer "components" (C) of this ...
1k views

### Cryptic Multiplications

Given two non-negative integers e.g. 27, 96 their multiplication expression would be 27 x 96 = 2592. If now each digits is ...
2k views

### Shifted auto-sum

Let’s take a positive integer such as 123. We define the shifted auto-sum of this integer as follows: 123 has 3 digits. We thus consider 3 copies of 123. We stack ...
984 views

### Exponential transform of an integer sequence

The exponential generating function (e.g.f.) of a sequence $a_n$ is defined as the formal power series $f(x) = \sum_{n=0}^{\infty} \frac{a_n}{n!} x^n$. When $a_0 = 0$, we can apply the ...
3k views

### How far from binary?

Given a decimal integer n as input, output the smallest (in terms of absolute value) decimal integer m such that the absolute ...
2k views

### Find the nth Fibonacci number, where n is the mth Fibonacci number

Introduction If $\newcommand{\fib}{\operatorname{fib}}\fib(x)$ calculates the $x$th Fibonacci number, write a program that calculates $\fib(\fib(m))$ for any integer value of $m \ge 0$. (Of ...
911 views

### Spell out an integer... in NDos' way

Objective Given a positive integer, spell it out in the conlang I made. Specification Let $n$ be the inputted integer. $n$ shall be spelled out in the following specification. The entire spelling ...
2k views

### Is it 1089-able?

$1089$ is a very special number. To prove why, select any 3-digit number whose first and last digits differ by at least 2. Then, reverse the digits, and take the difference of these two numbers. ...
1k views

...
1k views

### The interstice of two binary numbers

Given two integers, compute the two numbers that come from the blending the bits of the binary numbers of equal length(same number of digits, a number with less digits has zeros added), one after the ...
2k views

### Randomly Rounding

Input a decimal number and round it to an integer, randomly rounding up or down with a probability based on its fractional part, so the expected value of the output equals to the input value. If ...
572 views

### Double bit rotation to the right [closed]

Given a positive integer as input, output that integer, but with its bits rotated two times to the right. Also, think of the number as a donut of bits, eg. ...
291 views

### Line Islands in a Word Search

My third word search related challenge in a row. :) Challenge: Brief explanation of what a word search is: In a word search you'll be given a grid of letters and a list of words. The idea is to cross ...
275 views

### Find All Digitroot Cyclic Sequences With Length Greater Than One

Digital sum, DR, Digit root is the iterative process of summing digits of a number until you end up with a single digit root number: e.g. digit root of 12345 is 6 since 1 + 2 + 3 + 4 + 5 = 15 = 1+5. ...
3k views

### How-many-bonacci-like is this sequence?

Inspired by @emanresu A's Is it a fibonacci-like sequence? Make sure to upvote that challenge as well! We say a sequence is Fibonacci-like, if, starting from the third term ($1$-indexed), each term ...
332 views

### Coordinates for a Heronian tetrahedron

Did you know that Heronian Tetrahedra Are Lattice Tetrahedra? A Heronian tetrahedron is a tetrahedron where the length of each edge is an integer, the area of each face is an integer, and the volume ...
1k views