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 11-17 of 17 results.

A058024 a(n) = A051451(n) - A058023(n).

Original entry on oeis.org

3, 5, 7, 11, 11, 17, 19, 23, 17, 43, 59, 37, 29, 41, 53, 43, 37, 43, 47, 83, 71, 83, 61, 149, 73, 97, 89, 109, 113, 103, 113, 89, 137, 167, 157, 181, 239, 139, 241, 139, 179, 233, 193, 163, 241, 173, 283, 167, 271, 193, 277, 181, 179, 199, 269, 193, 223, 239
Offset: 3

Views

Author

Labos Elemer, Nov 15 2000

Keywords

Examples

			So far, all terms are primes. The analogy with fortunate numbers (A005235) is clear.
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, Aug 20 2021
Name corrected by Sean A. Irvine, Jul 18 2022

A082432 a(n) = p - A072181(n), where p is the least prime > A072181(n) + 1.

Original entry on oeis.org

2, 3, 5, 5, 7, 7, 11, 13, 13, 13, 13, 13, 17, 17, 17, 23, 59, 47, 41, 23, 23, 23, 83, 293, 383, 383, 103, 563, 107, 107, 71, 1399, 1399, 1399, 1399, 2803, 983, 983, 983, 10589, 5693, 5693, 19553, 827, 31699, 31699, 33001, 12193
Offset: 1

Views

Author

Naohiro Nomoto, Apr 25 2003

Keywords

Comments

Is a(n) always prime?

Examples

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

Crossrefs

Extensions

a(36)-a(47) from Iain Fox, Nov 23 2017
a(48) from Iain Fox, Nov 29 2017

A098168 Prime index j such that prime(j) = the n-th fortunate number, A005235(n).

Original entry on oeis.org

2, 3, 4, 6, 9, 7, 8, 9, 12, 18, 19, 18, 20, 15, 28, 17, 18, 29, 24, 27, 22, 36, 45, 26, 27, 51, 48, 31, 48, 43, 38, 50, 117, 52, 37, 39, 85, 52, 46, 43, 46, 76, 51, 133, 65, 137, 111, 65, 76, 62, 86, 67, 61, 59, 58, 79, 63, 67, 75, 94, 67, 64, 78, 67, 71, 81, 82, 153, 101, 221
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]; Table[ PrimePi[ Fortunate[n]], {n, 70}] (* Robert G. Wilson v, Sep 04 2004 *)

Extensions

More terms from Robert G. Wilson v, Sep 04 2004
Better definition from R. J. Mathar, Oct 28 2007

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)

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

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

A305099 Least prime m such that either prime(n)# - m is prime or prime(n)# + m is prime, where p# denotes the product of all primes <= p.

Original entry on oeis.org

3, 3, 7, 11, 13, 17, 19, 23, 37, 41, 67, 59, 47, 47, 67, 59, 61, 89, 89, 103, 79, 83, 89, 97, 103, 131, 113, 127, 223, 191, 163, 179, 389, 239, 151, 167, 173, 239, 199, 191, 199, 223, 233, 593, 293, 457, 227, 311, 373, 257, 307, 313, 283, 277, 271, 307, 307
Offset: 1

Views

Author

David Nicolas Lopez, May 22 2018

Keywords

Comments

Since it is known that the first 2000 terms of A005235 are primes, and the first 1000 terms of A055211 are primes, then the first 1000 terms of this sequence are also the least m > 1 such that prime(n)# - m is prime or prime(n)# + m is prime. - Amiram Eldar, Nov 02 2018

Examples

			For n = 6, the sixth primorial is 30030. The nearest prime such that p(6)# plus or minus prime equals its 30030's closest prime is equal to 17 because 30030+17=30047 which is prime or 30030 - 17 = 30013 which is also prime. Given that we only care about the smallest prime distance to the closest prime to the primorial, then we return 17.
For n = 7, the seventh primorial is 510510. The closest prime to the primorial is 510529 which is 510510 + 19; therefore 19 is in the sequence.
		

References

  • Martin Gardner, The Last Recreations (1997), pp. 194-195.
  • R. K. Guy, Unsolved Problems in Number Theory, Section A2
  • Stephen P. Richards, A Number For Your Thoughts, 1982, p. 200.

Crossrefs

Programs

  • Mathematica
    primorial[n_] := Product[Prime[i], {i, 1, n}]; a[n_] := Module[{k = 2, pr = primorial[n]}, While[! PrimeQ[pr - k] && ! PrimeQ[pr + k], k = NextPrime[k]]; k]; Array[a, 57] (* Amiram Eldar, Oct 31 2018 *)
  • PARI
    a(n) = { my(pr = prod(k=1, n, prime(k)), m=2); while (!isprime(pr-m) && !isprime(pr+m), m = nextprime(m+1)); m;} \\ Michel Marcus, Nov 02 2018
  • Sage
    # returns quasi-fortunate-numbers up to n
    def generateQFN(n):
        quasi_fortunate_numbers = []
        primorialArray = []
        prime = Primes()
        num_length = n+1
        primorial = 1
        for i in range(num_length):
            primorial *= prime[i]
            primorialArray.append(primorial)
        for primorials in primorialArray:
            num = 0
            while num < num_length:
                if is_prime(primorials+prime[num]):
                    quasi_fortunate_numbers.append(prime[num])
                    break
                elif is_prime(primorials-prime[num]):
                    quasi_fortunate_numbers.append(prime[num])
                    break
                num += 1
        return quasi_fortunate_numbers
    generateQFN(7)
    

Formula

a(n) = min(A005235(n), A055211(n)), for n > 1.

Extensions

More terms from Amiram Eldar, Oct 31 2018
Previous Showing 11-17 of 17 results.