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.

User: Daniel D Gibson

Daniel D Gibson's wiki page.

Daniel D Gibson has authored 6 sequences.

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

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

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

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

A378018 Primes p which can be written as p = (A060735(k) +- next largest prime factor not in A060735(k)) for some k.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 53, 67, 83, 97, 113, 127, 157, 173, 199, 409, 431, 619, 641, 829, 1039, 1061, 1249, 1459, 1481, 1669, 1879, 1901, 2089, 2111, 2297, 6917, 9227, 13873, 16183, 18493, 23087, 25423, 27733, 30013, 30047, 60077, 90073
Offset: 1

Author

Daniel D Gibson, Nov 14 2024

Keywords

Comments

A060735 can be thought of as multiples of primorials, up to the next prime not found in the given primorial. This sequence adds or subtracts that next prime to produce new prime values.
31 is the first prime this does not produce (other than 2).
143 is the first nonprime value that this pattern produces (other than values < 3).
Conjectured to be infinite.

Examples

			23 is a term because 23 = 2*3*5 - 7 and it is prime.
67 is a term because 67 = 2*2*3*5 + 7 and it is prime.
		

Crossrefs

Cf. A060735, subset of A000040, superset of A367182, superset of A038708.

Programs

  • PARI
    rad(n) = factorback(factorint(n)[, 1]);
    lista(nn) = my(a=1, list = List()); for (n=2, nn, my(f = factor(a), p = if (a==1, 2, nextprime(vecmax(f[,1])+1))); if (isprime(a-p), listput(list, a-p)); if (isprime(a+p), listput(list, a+p)); a = a + rad(a);); vecsort(Set(list)); \\ Michel Marcus, Dec 14 2024

Formula

(not in order) primorial(i) * m +- prime(i+1) where 0

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

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

A377884 Composite numbers k without prime factors that are divisors of the greatest primorial less than k.

Original entry on oeis.org

25, 49, 77, 91, 119, 121, 133, 143, 161, 169, 187, 203, 209, 221, 247, 253, 289, 299, 319, 323, 341, 361, 377, 391, 403, 407, 437, 451, 473, 481, 493, 517, 527, 529, 533, 551, 559, 583, 589, 611, 629, 649, 667, 671, 689, 697, 703, 713, 731, 737, 767, 779, 781, 793, 799
Offset: 1

Author

Daniel D Gibson, Nov 10 2024

Keywords

Examples

			The greatest primorial below 25 is 6, the factors of which are 2 and 3, neither of which are factors of 25=5^2.
		

Crossrefs

Intersection of A002808 and A335284.

Programs

  • Mathematica
    q[k_] := Module[{p = 2, r = 2}, If[CompositeQ[k], While[r < k && ! Divisible[k, p], p = NextPrime[p]; r *= p]; r >= k, False]]; Select[Range[800], q] (* Amiram Eldar, Nov 14 2024 *)
  • PARI
    P(n)=my(t=1, k); forprime(p=2, , k=t*p; if(k>n, return(t), t=k)); \\ A260188
    isok(k) = (k>1) && !isprime(k) && (gcd(k, P(k-1)) == 1); \\ Michel Marcus, Nov 12 2024

A367182 Primes of the form (k-th primorial) - (k+1)st prime.

Original entry on oeis.org

23, 199, 2297, 30013, 9699667, 3217644767340672907899084554047, 267064515689275851355624017992701, 23768741896345550770650537601358213, 1492182350939279320058875736615841068547583863326864530259
Offset: 1

Author

Daniel D Gibson, Nov 08 2023

Keywords

Comments

Conjecture: sequence is infinite.

Examples

			primorial(4) - prime(4+1) = 2*3*5*7 - prime(5) = 210 - 11 = 199, which is prime, so 199 is a term.
		

Crossrefs

Cf. A002110, A093078, A249798 (corresponding k's).
The prime numbers in A060882.
A038708 with subtraction instead of addition.