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-4 of 4 results.

A364678 Maximum number of primes between consecutive multiples of n, as permitted by divisibility considerations.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 5, 7, 7, 6, 7, 7, 7, 7, 8, 7, 8, 9, 8, 10, 8, 10, 10, 10, 11, 11, 11, 10, 11, 11, 11, 12, 12, 12, 12, 13, 12, 13, 14, 13, 13, 14, 14, 15, 15, 14, 15, 15, 15, 16, 15, 15, 16, 16, 17, 16, 17, 18, 18, 18, 18, 18, 17, 19, 19, 19, 19, 20, 20, 19, 19, 20, 21, 21
Offset: 1

Views

Author

Brian Kehrig, Aug 24 2023

Keywords

Comments

Alternatively: a(n) = the maximum number of elements of an admissible k-tuple strictly contained in (0,n) such that all elements are relatively prime to n. Recall that an admissible tuple is defined as a tuple of integers with the property that all primes p have at least one residue class that has no intersection with the tuple.
For n > 1, we have a(n) <= A023193(n-1), with equality if (but not only if) n is prime or a power of 2. The smallest n for which it is not an equality is n=14.
Conjecture 1: Every nonnegative integer appears in this sequence.
Conjecture 2: For all n, there is an infinitude of k's such that there are a(n) primes between n*k and n*(k+1).
Conjecture 2 resembles the k-tuples conjecture a.k.a. the first Hardy-Littlewood conjecture, although it is not the same.
A notable value is a(35) = 8. Compare with A000010(210) = 48. This says that between any two consecutive multiples of 210 the 48 values that are not divisible by 2, 3, 5 or 7 are equally distributed between 6 equal divisions of 210; that is, 8 are in the interval [0, 34], 8 in the interval [35, 69], etc. - Peter Munn, Feb 16 2024

Examples

			Between two multiples of 15 (n and n+15), only n+1, n+2, n+4, n+7, n+8, n+11, n+13, and n+14 could possibly be prime based on divisibility by 3 and 5. However, 4 of these are even and 4 are odd, so at most 4 of them can be prime. Thus, a(15)=4.
		

Crossrefs

Multiples of n following which the maximum number of primes occur for particular n: A005097 (2), A144769 (3), A123986 (4), A056956 (6), A007811 (10), A123985 (12), A309871 (18).

Programs

  • Python
    # see Links section

A181709 Indices of primes in A007310.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 10, 11, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 27, 28, 30, 33, 34, 35, 36, 37, 38, 43, 44, 46, 47, 50, 51, 53, 55, 56, 58, 60, 61, 64, 65, 66, 67, 71, 75, 76, 77, 78, 80, 81, 84, 86, 88, 90, 91, 93, 94, 95, 98, 103, 104, 105, 106, 111, 113, 116, 117, 118
Offset: 1

Views

Author

Grant Garcia, Nov 07 2010

Keywords

Comments

All primes but 2 and 3 are present in A007310, making this sequence an efficient method for storing large quantities of primes. To unpack this sequence into primes, use the formula (6n + (-1)^n - 3) / 2.
Indices 1 and 9 (1 and 25) are the smallest nonprimes.

Examples

			A007310(2), 5, is the first prime of the sequence.
A007310(50), 149, is also a prime, hence 50 is included.
		

Crossrefs

Programs

  • Mathematica
    Floor[Prime[Range[3,80]]/3]+1 (* Harvey P. Dale, Sep 12 2019 *)
  • Python
    from sympy import isprime
    out = ""
    for n,p in enumerate(isprime((6*n+(-1)**n-3)//2) for n in range(1,1000)):
        out+=["","%s "%str(n+1)][p]
    for n,p in enumerate(out.rstrip(" ").split(" ")): print(n+1,p)

Formula

a(n) = floor(prime(n+2)/3)+1 = A144769(n+2)+1. - Gary Detlefs, Dec 11 2011
a(n) ~ n*log(n)/3. - Ilya Gutkovskiy, Jul 18 2016

A253178 Least k>=1 such that 2*A007494(n)^k+1 is prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 47, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 1, 2729, 1, 1, 2, 1, 2, 175, 1, 1, 1, 1, 1, 1, 3, 3, 3, 43, 1, 1, 2, 1, 1, 3, 2, 1, 1, 3, 1, 11, 1, 1, 4, 1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 192275, 2, 1233, 1, 3, 5, 51, 1, 1, 1, 1, 286, 1, 1, 755, 2, 1, 4, 1, 6, 1, 2
Offset: 1

Views

Author

Eric Chen, Mar 20 2015

Keywords

Comments

If n == 1 (mod 3), then for every positive integer k, 2*n^k+1 is divisible by 3 and cannot be prime (unless n=1). Thus we restrict the domain of this sequence to A007494 (n which is not in the form 3j+1).
Conjecture: a(n) is defined for all n.
a(145) > 200000, a(146) .. a(156) = {1, 1, 66, 1, 4, 3, 1, 1, 1, 1, 6}, a(157) > 100000, a(158) .. a(180) = {2, 1, 2, 11, 1, 1, 3, 321, 1, 1, 3, 1, 2, 12183, 5, 1, 1, 957, 2, 3, 16, 3, 1}.
a(n) = 1 if and only if n is in A144769.

Crossrefs

Programs

  • Mathematica
    A007494[n_] := 2n - Floor[n/2];
    Table[k=1; While[!PrimeQ[2*A007494[n]^k+1], k++]; k, {n, 1, 144}]
  • PARI
    a007494(n) = n+(n+1)>>1;
    a(n) = for(k=1, 2^24, if(ispseudoprime(2*a007494(n)^k+1),return(k)));

Formula

a(n) = A119624(A007494(n)).

A287920 Triangle T(n,k) read by rows: T(n,k) = floor(prime(n)/prime(k)), n >= k >= 1.

Original entry on oeis.org

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

Views

Author

Bob Selcoe, Jun 02 2017

Keywords

Comments

Alternate name: triangle of quotients of prime(n)/prime(k), n >= k >= 1.

Examples

			Triangle starts:
n/k  1  2  3  4  5  6  7  8  9 10 11 12
1    1
2    1  1
3    2  1  1
4    3  2  1  1
5    5  3  2  1  1
6    6  4  2  1  1  1
7    8  5  3  2  1  1  1
8    9  6  3  2  1  1  1  1
9    11 7  4  3  2  1  1  1  1
10   14 9  5  4  2  2  1  1  1  1
11   15 10 6  4  2  2  1  1  1  1  1
12   18 12 7  5  3  2  2  1  1  1  1  1
T(11,3) = 6 because prime(11) = 31 and prime(3) = 5, and floor(31/5) = 6.
		

Crossrefs

Cf. A000040 (primes), A130290 (1st column), A144769 (2nd column), A116572 (3rd column).

Programs

  • PARI
    T(n,k) = prime(n)\prime(k);
    tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n, k), ", ")); print()); \\ Michel Marcus, Jun 06 2017
Showing 1-4 of 4 results.