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.

Showing 1-1 of 1 results.

A334127 Number of nonempty sets {p_1, p_2, ..., p_k} such that Product_{i=1..k} p_i divides Product_{i=1..k} (n + p_i), where the p_i are distinct primes.

Original entry on oeis.org

1, 3, 4, 7, 6, 19, 8, 17, 8, 25, 12, 105, 8, 35, 22, 24, 16, 59, 28, 77, 30, 26, 22, 159, 8, 117, 23, 161, 26, 787, 32, 69, 46, 57, 30, 534, 32, 69, 90, 137, 22, 707, 20, 266, 54, 73, 50, 423, 38, 626, 62, 229, 52, 1324, 220, 489, 130, 285, 58, 2943, 24, 119, 274, 171, 202, 12089, 46, 181, 158, 201, 66, 1999, 58, 391, 234, 917, 126, 451, 42, 1767, 73, 1034, 86, 34691, 81, 150, 142, 233, 94, 18319, 226, 477, 70, 477, 114, 4419, 54, 157, 234, 2252
Offset: 1

Views

Author

Jinyuan Wang, May 10 2020

Keywords

Comments

a(n) is always finite. Proof: let p_1 < p_2 < ... < p_k, we can prove p_k <= 2*n^2 + n. If p_k > 2*n^2 + n, then 2*p_k > p_k + n, thus p_k - n is in the set. If p_k - m*n is in the set and m < n, then 2*(p_k - m*n) > p_k + n, thus p_k - (m+1)*n is in the set. Therefore, p_k - m*n are in the set for 0 <= m <= n. Since p_k - n*n > n + 1, p_k - m*n can be divisible by n + 1 for some m <= n, which is a contradiction to the p_i being primes.

Examples

			For n = 3, {3}, {2, 3}, {2, 5} and {2, 3, 5} are such sets, thus a(3) = 4.
		

Crossrefs

Programs

  • PARI
    a(n, k=primepi(2*n^2+n)) = {my(c=-1, p=primes(k)); forsubset(k, v, if(vecprod(vector(#v, i, p[v[i]]+n))%vecprod(vector(#v, i, p[v[i]])) == 0, c++)); c; }

Extensions

Terms a(13) onward from Max Alekseyev, Apr 08 2025
Showing 1-1 of 1 results.