# Questions tagged [number-theory]

Number theory involves properties and relationships of numbers, primarily positive integers.

407 questions
Filter by
Sorted by
Tagged with
1k views

869 views

### Duplicates in "n × hamming weight of n" sequence

Background The sequence in the title is A245788 "n times the number of 1's in the binary expansion of n" ("times" here means multiplication), which starts like this: ...
1k views

### Non-Hamming numbers

Hamming number (also known as regular number) is a number that evenly divides powers of 60. We already have a task to do something with it. This time we are going to do the opposite. I define non-...
2k views

### How hyperperfect am I?

A $k$-hyperperfect number is a natural number $n \ge 1$ such that $$n = 1 + k(\sigma(n) − n − 1)$$ where $\sigma(n)$ is the sum of the divisors of $n$. Note that $\sigma(n) - n$ is the ...
1k views

### Calculate Home Primes

The Home Prime of an integer $n$ is the value obtained by repeatedly factoring and concatenating $n$'s prime factors (in ascending order, including repeats) until reaching a fixed point (a prime). ...
1k views

### The meeker number sequence

The Meeker numbers are a 7 digit number in form of $abcdefg$, where $a×b=10c+d$ and $d×e=10f+g$. As an example $6742612$ is a meeker number, here $6×7=10×4+2$ and $2×6=10×1+2$, so it is a ...
931 views

### Sociable sequences

Sociable numbers are a generalisation of both perfect and amicable numbers. They are numbers whose proper divisor sums form cycles beginning and ending at the same number. A number is $n$-sociable ...
2k views

### Reconstruct an integer from its prime exponents

All integers $n > 0$ can be expressed in the form $$n = \prod_{\text{prime } p} p^e = 2^{e_2} 3^{e_3} 5^{e_5} 7^{e_7} \cdots$$ This form is also known as it's prime factorisation or prime ...
2k views

### First sequence with no square differences

Consider the sequence $(a_n)$ defined in the following way. $a_0=0$ For all $n=1, 2, 3, \dots$, define $a_n$ to be the smallest positive integer such that $a_n-a_i$ is not a square number, ...
1k views

### Generalise perfect numbers

Let $\sigma(n)$ represent the divisor sum of $n$ and $\sigma^m(n)$ represent the repeated application of the divisor function $m$ times. Perfect numbers are numbers whose divisor sum equals ...
1k views

### Square root multiples

This code-challenge is based on OEIS sequence A261865. $A261865(n)$ is the least integer $k$ such that some multiple of $\sqrt{k}$ is in the interval $(n,n+1)$. The goal of this challenge is ...
2k views

### What's next, Achilles?

Powerful numbers are positive integers such that, when expressed as a prime factorisation: $$a = p_1^{e_1} \times p_2^{e_2} \times p_3^{e_3} \cdots \times p_k^{e_k}$$ all exponents $e_1, e_2, ...$ ...
1k views

### N-dimensional pyramid numbers [duplicate]

Given two inputs, a number n and a dimension d, generate the nth d-dimensional pyramid number. That was confusing, let me try again. For d = 1, the numbers start 1,2,3,4,5 and is the number of points ...
5k views

### Is it a vampire number?

Repost and improvement of this challenge from 2011 A vampire number is a positive integer $v$ with an even number of digits that can be split into 2 smaller integers $x, y$ consisting of the ...
6k views

### Is it a lobster number?

Introduction A "lobster number", by my own designation, is a number that contains within itself all of its prime factors. The "lobster" description was inspired by the recent ...
3k views

Related: Landau's function (OEIS A000793) Background Landau's function $g(n)$ is defined as the largest order of permutation of $n$ elements, which is equal to $\max(\operatorname{lcm}(a_1,a_2,\... 7answers 649 views ### Generalised Taxicab Numbers$\newcommand{T}{\text{Ta}(#1)} \newcommand{Ta}{\text{Ta}_{#2}^{#3}(#1)} \T n$is a function which returns the smallest positive integer which can be expressed as the sum of 2 positive integer ... 4answers 950 views ### (Almost) Solve Fermat's Last Theorem It's a well-known fact that Fermat's Last Theorem is true. More specifically, that for any integer$n \gt 2$, there are no three integers$a, b, c$such that a^n + b^n = c^n However, there are ... 28answers 3k views ### "Factorise" a quadratic [duplicate] When learning to factorise quadratics in the form$x^2 + ax + b$, a common technique is to find two numbers,$p, q$such that pq = b \\ p + q = a as, for such numbers,$x^2 + ax + b = (x + p)(...
2k views

Given a positive integer number $n$ output its perfect radical. Definition A perfect radical $r$ of a positive integer $n$ is the lowest integer root of $n$ of any index $i$: r = \sqrt[i]{...
3k views

### Narcissistic loop lengths

A narcissistic number is a natural number which is equal to the sum of its digits when each digit is taken to the power of the number digits. For example $8208 = 8^4 + 2^4 + 0^4 + 8^4$, so is ...
551 views

### Repetend length in 1/n

This problem is based on non-terminating, repeating decimal points. Let $n$ be any positive integer $(n > 1 \text{ and } n < 10000)$, say $7$. Then, $1/n = 1/7 = 0.142857142857142857...$ ...
1k views

### Count the Collatz survivors mod 2^n

Introduction We have 22 Collatz conjecture-related challenges as of October 2020, but none of which cares about the restrictions on counter-examples, if any exists, to the conjecture. Considering a ...
2k views

### Find a divisibility pattern

Background Sometimes when I'm golfing a program, I'm presented with the following situation: I have an integer value $x$ on some fixed interval $[a, b]$, and I'd like to test whether it's in some ...
522 views