[math-fun] Positive integers mod primes
Here's a sequence I've been playing with; is anything much known about it? For a positive integer n, find n mod p, where p is the largest prime not larger than n. Continue with that result, finding its residue mod its largest prime, etc., until you come down to 0 or 1. For example, 9 mod 7 = 2 and 2 mod 2 = 0, so the ninth element is 0. The sequence begins: 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1 and seems to have blocks of zeroes embedded between 1s. The sequence of the lengths of the blocks of zeroes begins: 2, 1, 1, 3, 1, 3, 1, 3, 2, 2, 1, 2, 2, 3, 1, 3, 2, 2, 2. For n = 9, there are two changes before the final result (9 to 2 and 2 to 0). The sequence of numbers of changes begins: 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1 and seems to be of the form of blocks of repeating numbers. The sequence of the lengths of these blocks begins: 1, 7, 2, 4, 2, 4, 2, 2, 4, 4, 4, 2, 2, 4, 2, 2, 4, 2, 4, 4. None of these four sequences is in OEIS. Is this interesting enough to add to OEIS? Kerry -- lkmitch@gmail.com www.fractalus.com/kerry
On Sun, 6 Aug 2006, Kerry Mitchell wrote:
Here's a sequence I've been playing with; is anything much known about it?
For a positive integer n, find n mod p, where p is the largest prime not larger than n. Continue with that result, finding its residue mod its largest prime, etc., until you come down to 0 or 1. For example, 9 mod 7 = 2 and 2 mod 2 = 0, so the ninth element is 0. The sequence begins: [...]
Interesting. You're finding a representation of n as a sum of products of primes. Given the distribution of primes, and the fact that you're using the largest prime less than each n, the coefficient for each prime will usually be 1. In fact, it seems likely that 4 is the only case in which the largest prime has to be multiplied by something other than 1: 1:1, 2:2, 3:3, 4:2*2, 5:3, 6:5, 7:7, 8:5, 9:7, 10:7, 11:11, 12:11, 13:13, 14:13, etc. So apart from that wrinkle, it looks like you're finding the representation of n as a simple sum of unique primes. One other observation: Excepting the 4 anomaly and the case of the odd prime (2), I'd expect the last residue (1/0) to be a straightforward function of the number of reductions (each one subtracting an odd number) and the evenness of n. But I haven't checked it. -J
participants (2)
-
Jason Holt -
Kerry Mitchell