OFFSET
1,6
COMMENTS
Conjecture A: Each value occurs an infinite number of times in the sequence.
Conjecture B: All natural numbers occur in the sequence.
LINKS
Michel Marcus, Table of n, a(n) for n = 1..5000
EXAMPLE
For prime(n=6): 13 - 2 = 11, and 13 - 6 = 7, so a(6) = 2.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Daniel D Gibson, Jun 22 2025
EXTENSIONS
More terms from Michel Marcus, Jun 22 2025
STATUS
approved
