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.

Previous Showing 41-50 of 57 results. Next

A268608 a(n) is the least m > 1 such that (prime(n)#)^n - m is prime.

Original entry on oeis.org

5, 7, 19, 23, 41, 163, 67, 257, 83, 109, 43, 359, 293, 647, 277, 1567, 983, 419, 1723, 83, 103, 3089, 719, 733, 1723, 457, 331, 2729, 3389, 1123, 863, 1123, 1871, 6211, 19717, 5323, 5749, 419, 887, 811, 617, 2851, 2531, 5023, 6883, 6661, 2879, 16433, 19471
Offset: 2

Views

Author

Alexei Kourbatov, Feb 08 2016

Keywords

Comments

Here prime(n)# denotes the primorial A002110(n), i.e., the product of the first n primes. a(1) is not defined (there are no primes less than 2).
The definition is similar to Lesser Fortunate numbers (A055211) - but here primorials A002110(n) are raised to the n-th power.
Similar to Fortunate numbers (A005235) and Lesser Fortunate numbers (A055211), the first fifty terms are all prime. (Cf. A263925 where the 6th term is composite.)

Examples

			a(2)=5 because m=5 is the least m > 1 such that A002110(2)^2 - m is prime.
		

Crossrefs

Programs

  • PARI
    a(n)=my(s=prod(i=1, n, prime(i))^n); s-precprime(s-2)

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

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 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
Offset: 1

Views

Author

Vladimir Shevelev, May 07 2016

Keywords

Comments

Conjecture: Terms are either 1 or prime, n>7. - Bill McEachen, Jun 11 2025

Crossrefs

Extensions

a(25)-a(77) from Giovanni Resta, May 07 2016

A295741 a(n) is smallest divisor d of the n-th primorial such that d + prime(n)#/d is prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 5, 6, 10, 2, 1, 2, 11, 7, 2, 41, 2, 5, 5, 5, 3, 51, 10, 3, 14, 37, 10, 7, 2, 17, 17, 62, 21, 3, 38, 17, 47, 13, 17, 13, 7, 21, 83, 10, 138, 10, 26, 2, 7, 19, 31, 15, 13, 5, 23, 103, 19, 5, 95, 61, 6, 15, 2, 35, 13, 19, 65, 39, 7, 43, 73, 13, 26, 97, 1, 91, 2, 78, 19, 39, 34, 167, 82, 10, 38, 66, 58, 2, 46, 71
Offset: 0

Views

Author

Keywords

Comments

Conjecture: a(n) < prime(n)^2 for n > 0.
a(n) = 1 iff n belongs to A014545.
Inspired by A293756.

Examples

			a(3) = 1 because 1 + prime(3)#/1 = 1 + 2*3*5 = 31 and 31 is a prime;
a(6) = 2 because 2 + prime(6)#/2 = 2 + 2*3*5*7*11*13/2 = 15017 and that is a prime;
a(7) = 5 because 5 + prime(7)#/5 = 5 + 2*3*5*7*11*13*17/5 = 102107 which is a prime; etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d = 1, p = Fold[Times, 1, Prime@ Range@ n]}, While[ !PrimeQ[d + p/d], d++]; d]; Array[f, 90]
  • PARI
    a(n)=my(P=vecprod(primes(n))); for(d=1,P, if(P%d==0 && ispseudoprime(d+P/d), return(d))) \\ Charles R Greathouse IV, Nov 27 2017

A354882 a(n) is the smallest number k that is divisible by all numbers d with d < p = prime(n), and such that all of k+1, k-1, k+p, k-p are prime.

Original entry on oeis.org

12, 60, 93240, 2383920, 298378080, 5133688560, 73329656400, 2168462696400, 1215784751781600, 150901712773812000, 133573286426580000, 657837749787992373600, 10597036678652724300000, 2761248653283183065402400, 2053281233421697855815439200
Offset: 3

Views

Author

Florian Baur, Jun 10 2022

Keywords

Comments

Suggested by Charles Kusniec on the mersenneforum.org message board (see "Links" section): a number c(n) = k(n) + r(n), where k(n) = m * A099795(n), r(n) = {-1, 1, p, -p} and p = prime(n), is not divisible by any d with d < p and the density of primes among c(n) is expected to be higher than for random numbers of that magnitude.
The probability that an arbitrary c(n) is prime is higher than that of an arbitrary number of the same magnitude. Let t(n) denote that probability, then t(n) = 1/(((1/2)*(2/3)*(4/5)*(6/7)*...*(prime(n-1)-1)/prime(n-1)) * log(c(n))). According to Mertens's third theorem the value asymptotically approaches 1/((e^gamma/log(prime(n-1))) * log(c(n))). log(c(n)) can be approximated as prime(n-1). This yields t(n) ~ log(prime(n-1))/(e^gamma*prime(n-1)). The probability that c(n) is prime for a random value of m is t(n)^4. Thus, the sequence is expected to grow with (prime(n-1)/log(prime(n-1)))^4*A099795(n). For n < 201 the arithmetic mean of m(n)*t(n)^4 is 1.1. - Florian Baur, Jul 12 2023
For all n < 171, a(n) > a(n-1) with the exception of a(11) < a(10). This occurs whenever m(n-1) > prime(n) * m(n).
The principle can be extended to r(n,i) = {-1,1,-p,p,-q_i,q_i} where q_i = prime(n+i). Such a sequence b for i = 1 would have b(3) = 12, as 5, 7, 11, 13, 17, 19 are all prime. This is the only number k for which all three of k+-1, k+-5, and k+-7 are prime. To satisfy the first requirement for k > 6, we need k == {0, 2, 8} (mod 10). Under this condition, one of k-5 or k+-7 will be divisible by 5. Since 12 - 7 = 5 is the only prime that is divisible by 5, k = 12 is the only k satisfying the condition.
If q, with a(n) + 1 < q < a(n) + prime(n)^2, is prime, the difference r(n) = q - a(n) is also prime. Proof: Per definition a(n) is divisible by all d < prime(n). It follows that, if r is divisible by any d, then so is q = a(n) + r, whence q is not prime. Thus, if q is prime, then r is either also prime or only has prime factors f >= prime(n), i.e., r >= prime(n)^2. See "Fortunate Numbers" (A005235).
There is no a(1) and a(2). Since prime(1) = 2, both k+1 and k+2 need to be prime. This is only true for k = 1, but 1 - 1 = 0 is not prime. For a(2) we have prime(2) = 3 and one of k+1, k-1, k+3 is divisible by 3.

Examples

			a(3): The 3rd prime is 5. The smallest number divisible by all d < 5 is 12. Since 12 - 1 = 11, 12 + 1 = 13, 12 + 5 = 17, 12 - 5 = 7 are all prime, a(3) = 12.
a(5): The 5th prime is 11. The smallest number divisible by all d < 11 is 2520. However, 2520 - 1 = 2519 is not prime. The smallest number satisfying all conditions is 93240, since 93240 - 1, 93240 + 1, 93240 + 11, 93240 - 11 are all prime and 93240 is divisible by all d < 11. Thus, a(5) = 93240.
		

Programs

  • PARI
    A354882(n) = { my(s = 1, p = prime(n), c = lcm([1..p-1])); while(!(isprime(s*c+1) & isprime(s*c-1) & isprime(s*c+p) & isprime(s*c-p)), s++); return(s*c)} \\ Florian Baur, Jul 17 2023

Formula

a(n) = m(n) * A099795(n). Specifically, m(3) = m(4) = 1. For all other n < 201, 25 < m(n) < 333054037 and m(n) cannot have prime(n) as a factor. - Florian Baur, Jul 12 2023

A054273 Number of primes p in the interval prime(n+1) <= p < prime(n+1)^2 such that A002110(n)+p is prime.

Original entry on oeis.org

2, 6, 10, 19, 23, 29, 25, 38, 42, 35, 56, 54, 45, 60, 67, 84, 66, 76, 94, 98, 95, 92, 108, 108, 107, 129, 127, 128, 127, 152, 160, 152, 145, 173, 153, 156, 183, 214, 208, 212, 201, 220, 220, 219, 222, 248, 255, 241, 252, 265, 265, 252, 280, 276, 291, 292
Offset: 1

Views

Author

Labos Elemer, May 05 2000

Keywords

Examples

			n=3, prime(4)=7, prime(4)^2=49; 3rd primorial number = 30; in interval [7,49] 12 primes p occur of which 10 are such that 30+p is prime, namely 30+{7,11,13,17,23,29,31,37,41,43} = {37,41,...,73}, "post-primorial primes", while two primes 19 and 47 yield 49, 77 which are composites. So a(3)=10.
		

Crossrefs

A058020 Difference between lcm(1,..,n) and the smallest prime > lcm(1,...,n) + 1, where n runs over A000961, lcm(n) runs through A051451.

Original entry on oeis.org

3, 5, 5, 7, 11, 13, 11, 13, 31, 23, 19, 37, 41, 29, 31, 43, 53, 41, 53, 79, 59, 97, 59, 61, 113, 97, 179, 73, 73, 97, 103, 101, 109, 101, 229, 109, 139, 113, 227, 131, 191, 163, 139, 199, 151, 139, 181, 223, 229, 367, 239, 499, 251, 509, 251, 227, 373, 281, 233
Offset: 1

Views

Author

Labos Elemer, Nov 14 2000

Keywords

Comments

Analogous to Fortunate numbers and like them so far proved to be primes. This holds for x<=421: if Q is the first follower prime, then Q(421)-lcm(1,...421) = 557. For first some cases when 1+LCM is also a prime, the 2nd primes give 3,5,5,7,11,11,.. deviations, i.e. give primes.

Crossrefs

Programs

  • PARI
    N=1; for(n=2,1e3, if(isprimepower(n,&p), N*=p; print1(nextprime(N+2)-N", "))) \\ Charles R Greathouse IV, Nov 18 2015

Extensions

Name corrected by Charles R Greathouse IV, Nov 18 2015

A071771 Least k > 0 such that the nextprime(k*primorial(n)) - k*primorial(n) is composite.

Original entry on oeis.org

59, 413, 2018, 48907, 100284, 869700, 23094906, 272703171
Offset: 1

Views

Author

Keywords

Examples

			For a(2): the second primorial (A002110) is 6. It is not until k = 413, or 6*413 = 2478, that the next prime > 2478 = 2503 less 2478 which equals 25 is a composite.
		

Crossrefs

Programs

  • Mathematica
    Do[p = Product[ Prime[i], {i, 1, n}]; k = 1; While[ q = NextPrim[k*p] - k*p; q == 1 || PrimeQ[q], k++ ]; Print[k], {n, 1, 6}]

Extensions

a(8) from Sean A. Irvine, Aug 08 2024

A082433 a(n) = A072181(n) - p, where p is the largest prime < A072181(n) - 1.

Original entry on oeis.org

3, 5, 7, 7, 11, 11, 11, 11, 13, 23, 17, 17, 17, 41, 191, 47, 31, 53, 53, 53, 31, 179, 61, 61, 337, 131, 523, 523, 419, 223, 223, 223, 223, 79, 3821, 3821, 3821, 23399, 21269, 21269, 3607
Offset: 3

Views

Author

Naohiro Nomoto, Apr 25 2003

Keywords

Comments

Are all terms prime?
All terms are odd. - Michael S. Branicky, Sep 05 2021

Examples

			a(4) = A072181(4)-7 = 12-7 = 5.
		

Crossrefs

Programs

  • Python
    from sympy import factorint, isprime
    def afindn(terms):
        prev_factors, prevan, prevk, n = dict(), 1, None, 2
        for n in range(2, terms+1):
            n_factors, an = factorint(n), 1
            for pi in set(prev_factors.keys()) | set(n_factors.keys()):
                ei = prev_factors[pi] if pi in prev_factors else 1
                fi = n_factors[pi] if pi in n_factors else 1
                an *= pi**(ei*fi)
            if n >= 3:
                if an != prevan:
                    k = 3
                    while not isprime(an - k): k += 2
                else:
                    k = prevk
                print(k, end=", ")
                prevk = k
            prev_factors, prevan = factorint(an), an
    afindn(36) # Michael S. Branicky, Sep 05 2021

Extensions

a(36)-a(40) from Jinyuan Wang, Sep 05 2020
a(41)-a(43) from Michael S. Branicky, Sep 05 2021

A098169 a(n) = Sum_{i=1..n} A098168(i).

Original entry on oeis.org

2, 5, 9, 15, 24, 31, 39, 48, 60, 78, 97, 115, 135, 150, 178, 195, 213, 242, 266, 293, 315, 351, 396, 422, 449, 500, 548, 579, 627, 670, 708, 758, 875, 927, 964, 1003, 1088, 1140, 1186, 1229, 1275, 1351, 1402, 1535, 1600, 1737, 1848, 1913, 1989, 2051, 2137, 2204
Offset: 1

Views

Author

Pierre CAMI, Aug 30 2004

Keywords

Crossrefs

Programs

  • Mathematica
    NextPrime[n_Integer] := Block[{k}, k = n + 1; While[ !PrimeQ[k], k++ ]; k]; Fortunate[n_Integer] := Block[{p = Product[Prime[i], {i, 1, n}] + 1, q}, q = NextPrime[p]; q - p + 1]; t = Table[ PrimePi[ Fortunate[n]], {n, 70}]; Table[Plus @@ Take[t, n], {n, 52}] (* Robert G. Wilson v, Sep 04 2004 *)

Formula

Conjecture: a(n)/triangular(n) -> Log(e*Pi/2).

Extensions

More terms from Robert G. Wilson v, Sep 04 2004

A160434 a(n) is the least number k such that (k-th prime after A002110(n)+1) - A002110(n) is not a prime, where A002110(n) is the n-th primorial.

Original entry on oeis.org

2, 3, 7, 11, 20, 26, 30, 37, 43, 44, 42, 64, 66, 46, 70, 87, 99, 91, 78, 95, 133, 119, 113, 133, 121, 132, 134, 151, 129, 204, 221, 164, 176, 162, 177, 169, 172, 207, 234, 237, 251, 202, 231, 294, 271, 298, 284, 257, 254, 273, 319, 267, 278, 297, 309, 350, 354
Offset: 0

Views

Author

Frederick Magata (frederick.magata(AT)web.de), May 13 2009

Keywords

Comments

The conjecture on the fortunate numbers rephrased with a(n) is a(n)>=2 for all n>=0.
More generally, is a(n) > n+1 always true, or even a(n) > log(n+1)*(n+1)?

Examples

			a(3)=11: A002110(3)+1=2*3*5+1=31. The 11 primes after 31 are 37, 41, 43, 47, 53, 59, 61, 67, 71, 73 and 79.
Subtracting 2*3*5=30 from each yields: 7, 11, 13, 17, 23, 29, 31, 37, 41, 43, 49.
These are primes except for the 11th value, which is 49=7^2.
		

Crossrefs

Programs

  • Maple
    a(n):=proc(n) option remember;local k: for k from 1 while isprime((nextprime@@k)(A002110(n)+1)-A002110(n)) do od:
    k; end;
  • PARI
    a(n) = {my(k=0, P=prod(m=1, n, prime(m))); for(m=2, oo, if(ispseudoprime(P+m), k++; if(!isprime(m), return(k)))); } \\ Jinyuan Wang, Jun 13 2020

Extensions

More terms from Jinyuan Wang, Jun 13 2020
Previous Showing 41-50 of 57 results. Next