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.

A377887 a(n) is the number of ways of writing prime(n) as k-q with q a prime and k a primorial.

Original entry on oeis.org

0, 1, 0, 1, 2, 3, 4, 3, 3, 3, 1, 3, 4, 4, 5, 4, 5, 3, 4, 4, 5, 4, 4, 7, 8, 6, 5, 7, 4, 5, 9, 5, 6, 5, 9, 7, 4, 5, 8, 5, 8, 6, 7, 5, 9, 6, 5, 7, 6, 4, 3, 9, 6, 5, 12, 8, 5, 6, 7, 7, 6, 9, 8, 7, 13, 4, 8, 4, 6, 6, 7, 4, 7, 11, 5, 8, 8, 9, 6, 7, 7, 6, 12, 4, 10, 11, 11, 7, 8, 11
Offset: 1

Views

Author

Daniel D Gibson, Nov 10 2024

Keywords

Comments

Except at n=2, the largest k which must be considered is the product of the first n-1 primes, since if k includes p=prime(n) itself then q = k-p is divisible by p and so not prime.

Examples

			For n=4, p = prime(4) = 7 can be written as p = 30 - 23, where 30 is a primorial and 23 is prime, but no other primorials satisfy this condition, so a(3) = 1.
		

Crossrefs

Programs