cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A383844 a(n) is the number of occurences of n in A024934.

Original entry on oeis.org

3, 3, 0, 1, 2, 0, 1, 1, 3, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1
Offset: 0

Views

Author

Miles Englezou, May 12 2025

Keywords

Comments

Every k in A024934 is the sum of a tuple (x_1, ..., x_t) for prime(t) <= k < prime(t+1), where x_i = k mod prime(i). The tuples can be seen combinatorially as sets of t counters where the i-th counter cycles through 0 to prime(i)-1.
Since A024934(n) > n for n > 21, the set of numbers k for which A024934(k) = n is bounded above by n for those n, though smaller bounds are possible.
It is interesting to compare A024934 to A049802 (and likewise the current sequence with A383327). Every m in A049802 is also the sum of a tuple of congruences except the moduli are ascending powers of 2. Ordered by divisibility, the set of moduli in A049802 therefore form a chain (i.e., they are totally ordered) whilst the set of moduli in A024934 form an antichain (no one modulus divides any other). These opposed orders mean the two sequences behave quite differently.
Comparison of A049802 and A383327 vs. A024934 and {a(n)}:
- 0 appears infinitely many times in A049802, for every m = 2^n. Therefore 0 is not a term of A383327.
- A049802(2^n+1) = n. Therefore every n appears at least once in A049802.
- It is likely that every n appears at least once in A383327, however this is currently conjectural.
- If A049802(k) = m for 2^r-2^(r-2) <= k < 2^r, and if the rightmost summand in the tuple of m is x, then for s >= 0, A049802(k+2^((r-1)+s)) = m + x*(s+1).
A024934 and {a(n)}:
- 0 appears 3 times in A024934, for n = 0, 1, 2. Therefore a(0) = 3.
- It is not true that every n appears at least once in A024934 (e.g., 2 and 5 are not terms), and this is likely to be the case for infinitely many n, meaning it is likely that a(n) = 0 for infinitely many n.
- It appears to be unlikely that a(k) = n for every n: for 0 < n < 3500, a(n) <= 3 (and a(n) = 3 only for n = 0, 1, 8, 37, 781).

Examples

			 n | a(n) | k such that A024934(k) = n
---+------+---------------------------
 0 |  3   | {0, 1, 2}
 1 |  3   | {3, 4, 6}
 2 |  0   | {}
 3 |  1   | {5}
 4 |  2   | {7, 10}
 5 |  0   | {}
 6 |  1   | {8}
 7 |  1   | {9}
 8 |  3   | {11, 12, 15}
 9 |  0   | {}
10 |  1   | {14}
11 |  0   | {}
12 |  1   | {16}
13 |  1   | {13}
14 |  0   | {}
15 |  0   | {}
16 |  0   | {}
17 |  0   | {}
18 |  1   | {17}
19 |  0   | {}
20 |  1   | {18}
--------------------------------------
Illustration of some tuples
 n | A024934(n) |     tuple of n
---+------------+---------------------
 0 |     0      | ()
 1 |     0      | ()
 2 |     0      | (0)
 3 |     1      | (1 0)
 4 |     1      | (0 1)
 5 |     3      | (1 2 0)
 6 |     1      | (0 0 1)
 7 |     4      | (1 1 2 0)
 8 |     6      | (0 2 3 1)
 9 |     7      | (1 0 4 2)
10 |     4      | (0 1 0 3)
11 |     8      | (1 2 1 4 0)
12 |     9      | (0 0 2 5 1)
13 |    13      | (1 1 3 6 2 0)
14 |    10      | (0 2 4 0 3 1)
15 |     8      | (1 0 0 1 4 2)
16 |    12      | (0 1 1 2 5 3)
17 |    18      | (1 2 2 3 6 4 0)
18 |    20      | (0 0 3 4 7 5 1)
19 |    27      | (1 1 4 5 8 6 2 0)
20 |    28      | (0 2 0 6 9 7 3 1)
		

Crossrefs

Programs

  • PARI
    a(n) = my(f, S=[], b); (f(m) = my(r=0); forprime(p=2, m, r+=m%p); return(r)); if(n<=21, b=26, b=n); for(k=0, b, if(f(k)==n, S=concat(S, k))); return(#S)