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.

Showing 1-7 of 7 results.

A340006 Number of times the n-th prime (=A000040(n)) occurs in A060270.

Original entry on oeis.org

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

Views

Author

A.H.M. Smeets, Dec 26 2020

Keywords

Comments

Each term in A060270 is either 1 or a prime number. Moreover it is known that each prime occurs only a finite number of times in A060270.
By excluding the terms that equal one from A060270, we observe the smallest value of A060270(n)/log(A002110(n)) in the range n = 2..1000 to be ~1.014. From this it is believed that the primes less than 0.9*log(A002110(1001))*1.014 (~ 7138) will not occur anymore in the sequence A060270 for n > 1000; the applied factor 0.9 is a safety factor to be more or less sure that the prime numbers up to about 7138 will no longer occur in A060270.

Examples

			The prime number 7 does not occur in A060270, and A000040(4) = 7, so a(4) = 0.
The prime number 11 occurs 1 time in A060270, and A000040(5) = 11, so a(5) = 1.
		

Crossrefs

Formula

It seems that Sum_{k = 1..n} a(k) ~ 0.2*A000040(n)/log(log(A000040(n))).

A038711 a(n) is the smallest m such that A002110(n) + m is prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 17, 19, 23, 37, 61, 1, 61, 71, 47, 107, 59, 61, 109, 89, 103, 79, 151, 197, 101, 103, 233, 223, 127, 223, 191, 163, 229, 643, 239, 157, 167, 439, 239, 199, 191, 199, 383, 233, 751, 313, 773, 607, 313, 383, 293, 443, 331, 283, 277, 271, 401, 307
Offset: 0

Views

Author

Labos Elemer, May 02 2000

Keywords

Comments

Any composite a(n) would disprove Fortune's conjecture, see A005235. - Jeppe Stig Nielsen, Oct 31 2003

Examples

			For n=11, 1 + A002110(11) = 200560490131 < 200560490197 = 67 + A002110(11); therefore, a(11)=1 but A005235(11)=67.
		

Crossrefs

Programs

  • Maple
    p:= proc(n) option remember; `if`(n<1, 1, p(n-1)*ithprime(n)) end:
    a:= n-> nextprime(p(n))-p(n):
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 16 2020
  • Mathematica
    nmax=2^16384; npd=1;n=1;npd=npd*Prime[n]; While[npdLei Zhou, Feb 15 2005 *)
  • PARI
    a(n) = my(P=vecprod(primes(n))); nextprime(P+1) - P; \\ Michel Marcus, Dec 12 2023

Formula

a(n) = Min(1, A005235(n)); a(n)=1 for n=1, 2, 3, 4, 5, 11, 75, ...
a(n) = 1 for n=0, 1, 2, 3, 4, 5, 11, 75, ... (A014545); a(n) = A005235(n) otherwise. - Jeppe Stig Nielsen, Oct 31 2003
a(n) = A038710(n) - A002110(n). - Alois P. Heinz, Mar 16 2020

Extensions

a(0)=1 prepended by Alois P. Heinz, Mar 16 2020

A117825 Distance from n-th highly composite number (cf. A002182) to nearest prime.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 11, 13, 1, 11, 1, 17, 1, 1, 13, 13, 1, 1, 17, 1, 17, 1, 1, 17, 17, 17, 1, 1, 19, 37, 37, 1, 17, 23, 1, 29, 1, 1, 19, 1, 19, 23, 1, 19, 31, 1, 19, 1, 1, 1, 1, 23, 1, 29, 23, 23, 1, 23, 71, 37, 1, 1, 31, 1, 23, 53, 1, 31
Offset: 1

Views

Author

Bill McEachen, May 01 2006

Keywords

Comments

a) Conjecture: entries > 1 will always be prime. The entry will be larger than the largest prime factor of the highly composite number.
b) Will 1 always be the most common entry?
c) While a prime may always be located close to each highly composite number, is the converse false?
d) Is there always a prime between successive highly composite numbers?
From Antti Karttunen, Feb 26 2019: (Start)
The second sentence of point (a) follows as both gcd(n, A151799(n)) = 1 and gcd(A151800(n), n) = 1 for all n > 2 and the fact that the highly composite numbers are products of primorials, A002110 (with the least coprime prime > the largest prime factor). See also the conjectures and notes in A129912 and A141345. (End)

Examples

			a(5) = abs(12-11) = 1.
		

Crossrefs

Sequences tied to conjecture a): A228943, A228945.
Cf. also A005235, A060270.

Programs

Formula

a(1) = 1; for n > 1, a(n) = min(A141345(n), A324385(n)). - Antti Karttunen, Feb 26 2019

Extensions

More terms from Don Reble, May 02 2006

A324385 Distance from the n-th highly composite number, A002182(n), from the largest prime <= A002182(n).

Original entry on oeis.org

0, 1, 1, 1, 1, 5, 1, 1, 7, 1, 1, 1, 1, 1, 1, 11, 17, 1, 1, 1, 13, 11, 11, 19, 17, 13, 1, 23, 1, 1, 13, 17, 17, 13, 17, 1, 17, 1, 1, 23, 17, 17, 17, 1, 19, 83, 37, 23, 17, 23, 1, 43, 19, 1, 19, 43, 19, 31, 23, 19, 31, 19, 19, 1, 1, 1, 1, 47, 1, 31, 47, 23, 53, 23, 83, 37, 31, 1, 31, 1, 23, 61, 1, 41, 47, 61, 41, 29, 41, 29, 43, 73, 29, 47, 31, 31
Offset: 2

Views

Author

Antti Karttunen, Feb 26 2019

Keywords

Comments

Like in A141345 it appears (or is conjectured) that no composite numbers ever occur here. Taken together, this leads to McEachen's conjecture given in A117825. Here in range 2..10000 term 1 occurs for 313 times.
The arithmetic mean of a(n)/log(A002182(n)) for the terms 3..10000 is 1.513, i.e., a rough approximation is given by a(n) ~ log(A002182(n)^(3/2)). - A.H.M. Smeets, Dec 02 2020

Examples

			A002182(2) = 2, the largest prime <= 2 is 2 itself, thus a(2) = 2-2 = 0.
A002182(7) = 36, the largest prime <= 36 is 31, thus a(7) = 36-31 = 5.
		

Crossrefs

Programs

  • Mathematica
    With[{s = Array[DivisorSigma[0, #] &, 10^6]}, {0}~Join~Map[# - NextPrime[#, -1] &@ FirstPosition[s, #][[1]] &, Drop[Union@ FoldList[Max, s], 2]]] (* or *)
    {0}~Join~Map[# - NextPrime[#, -1] &, Import["https://oeis.org/A002182/b002182.txt", "Data"][[3 ;; 97, -1]] ] (* Michael De Vlieger, Dec 11 2020 *)
  • PARI
    A324385(n) = (A002182(n)-precprime(A002182(n)));

Formula

a(n) = A002182(n) - A007917(A002182(n)).

A340007 Number of times the n-th prime (=A000040(n)) occurs in A038711.

Original entry on oeis.org

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

Views

Author

A.H.M. Smeets, Dec 26 2020

Keywords

Comments

Each term in A038711 is either 1 or a prime number. Moreover it is known that each prime occurs only a finite number of times in A038711.
By excluding the terms that equal one from A038711, we observe the smallest value of A038711(n)/log(A002110(n)) in the range n = 2..1000 to be ~1.017. From this it is believed that the primes less than 0.9*log(A002110(1001))*1.017 (~ 7157) will not occur anymore in the sequence A038711 for n > 1000; the applied factor 0.9 is a safety factor to be more or less sure that the prime numbers up to about 7157 will no longer occur in A038711.

Examples

			The prime number 17 occurs 1 time in A038711, and A000040(7) = 17, so a(7) = 1.
The prime number 5 does not occur in A038711, and A000040(3) = 5, so a(3) = 0.
		

Crossrefs

Formula

It seems that Sum_{k = 1..n} a(k) ~ 0.7*A000040(n)/log(log(A000040(n))).

A268480 Integers k such that A002110(k) is the average of two consecutive primes.

Original entry on oeis.org

2, 3, 5, 8, 38, 40, 64, 73, 89, 236, 480, 486
Offset: 1

Views

Author

Altug Alkan, Mar 21 2016

Keywords

Comments

In other words, the primorial numbers that are considered are those of the form (p + q)/2 where p and q are consecutive primes. Note that the initial values of (p - q)/2 are 1, 1, 1, 23, 239, 191, 331, 373, 1021.
A088256 is a subsequence of these primorials, which in turn are a subsequence of A024675.
Numbers k such that A038711(k) = A060270(k). - Amiram Eldar, May 19 2024

Examples

			5 is a term because 2*3*5*7*11 = 2310 = (2309 + 2311)/2.
8 is a term because 2*3*5*7*11*13*17*19 = 9699690 = (9699667 + 9699713)/2.
		

Crossrefs

Programs

  • Maple
    P:= 2: count:= 0:
    for n from 2 to 500 do
      P:= P*ithprime(n);
      # first try d=1
      if isprime(P+1) then
        good:= isprime(P-1);
      elif isprime(P-1) then good:= false
      else
        for d from ithprime(n+1) by 2 do
          if igcd(d,P) > 1 then next fi;
          if isprime(P+d) then
            good:= isprime(P-d); break
          elif isprime(P-d) then
            good:= false; break
          fi
        od;
      fi;
      if good then
         count:= count+1;
         A[count]:= n;
      fi
    od:
    seq(A[i],i=1..count);  # Robert Israel, Aug 29 2016
  • Mathematica
    prim[n_] := Times @@ Prime[Range[n]]; Select[Range[2, 100], Total[NextPrime[(p = prim[#]), {-1, 1}]] == 2*p &] (* Amiram Eldar, May 19 2024 *)
  • PARI
    a002110(n) = prod(k=1, n, prime(k));
    for(n=2, 1e3, if((nextprime(a002110(n)) - a002110(n)) == (a002110(n) - precprime(a002110(n))), print1(n, ", ")))

A340041 The prime gap, divided by two, which surrounds p#.

Original entry on oeis.org

1, 1, 6, 1, 9, 24, 23, 40, 51, 37, 60, 36, 68, 87, 66, 84, 99, 95, 115, 88, 117, 143, 51, 177, 182, 168, 139, 243, 221, 193, 204, 516, 260, 154, 182, 306, 239, 216, 191, 211, 303, 263, 672, 303, 615, 417, 312, 378, 275, 375, 322, 445, 312, 294, 354, 492, 399, 348, 461
Offset: 2

Views

Author

Robert G. Wilson v, Jan 22 2021

Keywords

Comments

If p and q are consecutive primes, we say here that there is a gap of q-p. (Other sequences use different definitions of "gap".) - N. J. A. Sloane, Mar 07 2021
Records: 1, 6, 9, 24, 40, 51, 60, 68, 87, 99, 115, 117, 143, 177, 182, 243, 516, 672, 855, 915, 925, 1100, 1139, 1620, 1863, 2272, 2842, 4177, 4190, 5025, 5692, 6254, 6413, 6879, 7914, 8026, 9928, 10604, ..., .

Examples

			For a(1), there are two contiguous primes {2, 3} with 2 being 2#. The prime gap is 1. However, the two primes do not surround 2#, so a(1) like A340013(2) is undefined.
For a(2), the prime gap contains {5, 6, 7}, with 3# = 6 in the middle. The prime gap is 2, therefore a(2) = 1;
For a(3), the prime gap contains {29, 30, 31}, with 5# = 30  in the middle. The prime gap is 2, therefore a(3) = 1.
For a(4), the prime gap contains {199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211}, with 7# =  205 in the middle. The prime gap is 12, therefore a(4) = 6. etc.
		

Crossrefs

Cf. A006862, A007014, A038711, A060270, A340013 (analog for n!).

Programs

  • Mathematica
    a[n_] := Block[{p = Times @@ Prime@ Range@ n}, (NextPrime[p, 1] - NextPrime[p, -1])/2]; a[1] = 0; Array[a, 60]

Formula

a(n) = (A006862(n) - A007014(n))/2 = (A038711(n) + A060270(n))/2.
a(n) = A058044(n)/2. - Hugo Pfoertner, Jan 22 2021
Showing 1-7 of 7 results.