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.

A380450 Number of integers k such that prime(n) - primorial(k) is prime.

Original entry on oeis.org

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

Views

Author

Daniel D Gibson, Jun 22 2025

Keywords

Comments

Conjecture A: Each value occurs an infinite number of times in the sequence.
Conjecture B: All natural numbers occur in the sequence.

Examples

			For prime(n=6): 13 - 2 = 11, and 13 - 6 = 7, so a(6) = 2.
		

Crossrefs

Cf. A385210, A000040, A002110, A175974 (zeros (primes)), A115785 (record positions (primes)).

Programs

  • Mathematica
    a[n_]:=Module[{c=0},Do[d=Prime[n]-Fold[Times, 1, Prime[Range[k-1]]];If[PrimeQ[d]&&d>0,c++],{k,n}];c];Array[a,90] (* James C. McMahon, Jun 27 2025 *)
  • PARI
    pri(n) = vecprod(primes(n)); \\ A002110
    a(n) = my(nb=0, p=prime(n)); for (k=0, n, if (isprime(p-pri(k)), nb++); ); nb; \\ Michel Marcus, Jun 22 2025

Extensions

More terms from Michel Marcus, Jun 22 2025