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.

A385210 Number of integers k such that prime(n) + primorial(k) is prime.

Original entry on oeis.org

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

Views

Author

Daniel D Gibson, Jun 21 2025

Keywords

Examples

			For prime(n=3): 5 + 2 = 7, 5 + 6 = 11, and 5 + any higher primorial will be composite, so a(3) = 2.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; MapIndexed[Set[P[First[#2] - 1], #1] &, FoldList[Times, 1, Prime@ Range[nn]]]; Table[q = Prime[n]; Total@ Array[Boole@ PrimeQ[q + P[# - 1]] &, n], {n, nn}] (* Michael De Vlieger, Jun 22 2025 *)
  • PARI
    pri(n) = vecprod(primes(n)); \\ A002110
    a(n) = my(nb=0, p=prime(n)); for (k=0, n-1, if (isprime(p+pri(k)), nb++);); nb; \\ Michel Marcus, Jun 21 2025

Extensions

More terms from Michel Marcus, Jun 21 2025