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 61-66 of 66 results.

A104043 Primes p equal to the sum of two successive sexy primes + 1 such that p + 6 is also prime.

Original entry on oeis.org

17, 41, 53, 101, 173, 353, 461, 1013, 1181, 1301, 1361, 1901, 2441, 4001, 4133, 4673, 4793, 5381, 5393, 5801, 6653, 10601, 11801, 12101, 12641, 12653, 15641, 15761, 16481, 19073, 21221, 23561, 23813, 23873, 25301, 25793, 25841, 25913, 26921
Offset: 1

Views

Author

Giovanni Teofilatto, Mar 31 2005

Keywords

Crossrefs

Formula

A104228 INTERSECT A023201. [From R. J. Mathar, Nov 26 2008]

Extensions

Removed 31 and extended by R. J. Mathar, Nov 26 2008

A104047 Primes p equal to the sum of two successive sexy primes - 1 such that p - 6 is also prime.

Original entry on oeis.org

19, 67, 79, 199, 547, 619, 739, 1459, 1759, 3319, 3739, 4027, 4567, 5107, 5419, 6367, 7219, 8719, 9187, 9907, 10459, 10867, 11119, 12547, 13099, 14827, 15739, 16927, 17047, 18307, 21319, 25939, 27259, 27367, 31327, 33967, 37579, 38839, 38959
Offset: 1

Views

Author

Giovanni Teofilatto, Mar 31 2005

Keywords

Crossrefs

Programs

  • Mathematica
    Select[2#+5&/@Select[Prime[Range[4200]],PrimeQ[#+6]&],And@@PrimeQ[ {#,#-6}]&] (* Harvey P. Dale, Feb 28 2012 *)

Formula

A104227 INTERSECT A046117. [From R. J. Mathar, Nov 26 2008]

Extensions

23 and 29 removed, extended by R. J. Mathar, Nov 26 2008

A172988 Primes p such that either p-3 or p-6 is prime.

Original entry on oeis.org

5, 11, 13, 17, 19, 23, 29, 37, 43, 47, 53, 59, 67, 73, 79, 89, 103, 107, 109, 113, 137, 157, 163, 173, 179, 197, 199, 229, 233, 239, 257, 263, 269, 277, 283, 313, 317, 337, 353, 359, 373, 379, 389, 439, 449, 463, 467, 509, 547, 563, 569, 577, 593, 599, 607, 613
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 07 2010

Keywords

Comments

5 is the only prime p for which p-3 is prime, since p-3 is even for any odd prime and 2 is the only even prime. - Harvey P. Dale, Apr 03 2019

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[150]],AnyTrue[#+{-3,-6},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* or *) Join[{5},Select[Prime[ Range[ 3,150]],PrimeQ[#-6]&]] (* see Comment *) (* Harvey P. Dale, Apr 03 2019 *)

Formula

a(n)=A046117(n+1).

Extensions

449 inserted by R. J. Mathar, Mar 09 2010

A208123 Lengths of sequences of sexy primes in arithmetic progression with a common difference of six.

Original entry on oeis.org

5, 3, 3, 4, 4, 2, 3, 3, 2, 3, 3, 2, 2, 2, 3, 4, 3, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, 4, 4, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 3
Offset: 1

Views

Author

Eliot Ball, Mar 26 2012

Keywords

Comments

No numbers in the sequence are greater than 5, and 5 only appears once, at the start.

Examples

			The first four sequences of sexy primes in arithmetic progression with common difference of six (they are 'chained together') are (5, 11, 17, 23, 29), (7, 13, 19), (31, 37, 43), (41, 47, 53, 59).
		

Crossrefs

A309158 The smallest prime, a(n), larger than prime(n) for which every even difference from 2 to prime(n) - 1 occurs at least once for some pair of primes from prime(n) to a(n) inclusive.

Original entry on oeis.org

5, 11, 13, 23, 31, 47, 47, 53, 67, 67, 73, 101, 101, 107, 113, 131, 139, 151, 151, 151, 173, 179, 193, 193, 227, 227, 233, 241, 241, 283, 283, 293, 293, 313, 313, 353, 353, 353, 353, 397, 397, 397, 421, 421, 421, 461, 461, 467, 467, 503, 503, 503, 521, 563, 569, 599, 599
Offset: 2

Views

Author

Sally Myers Moite, Jul 14 2019

Keywords

Comments

The "prime differences prime" a(n) is the smallest prime greater than prime(n), n > 1, for which every even difference from 2 to prime(n)-1 occurs for some pair of primes from prime(n) to a(n) inclusive.
a(n) is at least prime(n) + (prime(n) - 1) = 2 * prime(n) - 1.
If the sequence of prime differences primes is infinite, there are infinitely many pairs of primes for each even difference. If there are only finitely many pairs of primes for some even difference, the sequence ends.
Ratios a(n)/prime(n), n = 2 to 15 are 1.67, 2.20, 1.86, 2.09, 2.38, 2.76, 2.47, 2.30, 2.31, 2.16, 1.97, 2.46, 2.35, 2.28.
Conjecture: The sequence is infinite.
Conjecture: There are finitely many values of n with a(n) = 2 * prime(n) - 1.
Conjecture: There are infinitely many values of n with a(n) = a(n-1).
Conjecture: For all n, a(n) <= 3 * prime(n). (This is true for n <= 101.)

Examples

			For n = 4, prime(4) = 7 and 7 - 1 = 6. Check differences for 7 and 11: 11 - 7 = 4. For 7, 11, and 13: 11 - 7 = 4, 13 - 7 = 6, 13 - 11 = 2, so a(4) = 13.
Also prime(6) = 13, 13 - 1 =  12. For 13, 17, 19, 23, 29 and 31, 29 - 17 = 12, 23 - 13 = 10, 31 - 23 = 8, 19 - 13 = 6, 17 - 13 = 4, 19 - 17 = 2, and a(6) = 31.
		

Crossrefs

Programs

  • Maple
    for n from 2 to 58 do
       a := ithprime(n):
       for d from 2 by 2 to a - 1 do
          p := ithprime(n);
          while not isprime(p + d) do
               p := nextprime(p)
          od;
          if p + d > a then a := p + d fi
       od;
       print(n, a)
    od: # Peter Luschny, Jul 17 2019
  • Mathematica
    For [n=2,n <= 101,n++,
         Clear[d];d=0;
         Clear[a];a=Prime[n];
         While[d < Prime[n]-1,
               d=d+2;
               Clear[m];m=n;
               While[CompositeQ[d+Prime[m]],m++];
               If[d+Prime[m] > a,a=d+Prime[m]]];
         Print[{n,Prime[n],a,N[a/Prime[n]]}]
         ]

A341827 a(n) is the distance from n to its more distant neighboring prime.

Original entry on oeis.org

2, 1, 2, 1, 4, 3, 2, 3, 4, 1, 4, 3, 2, 3, 4, 1, 4, 3, 2, 3, 6, 5, 4, 3, 4, 5, 6, 1, 6, 5, 4, 3, 4, 5, 6, 3, 2, 3, 4, 1, 4, 3, 2, 3, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 1, 6, 5, 4, 3, 4, 5, 6, 3, 2, 3, 4, 1, 6, 5, 4, 3, 4, 5, 6, 3, 2, 3, 6, 5, 4, 3, 4, 5, 8
Offset: 3

Views

Author

Ya-Ping Lu, Feb 20 2021

Keywords

Comments

a(n) is even if n is odd and vice versa. It seems that all records are even.
n - 1 and n + 1 are twin primes if a(n) = 1.
n - 2 and n + 2 are cousin primes for n > 3 if a(n) = 2.
n - 3 and n + 3 are sexy primes if a(n) = A051700(n) = 3.

Crossrefs

Programs

  • Mathematica
    Array[Max[#1 - #2, #3 - #1] & @@ Prepend[NextPrime[#, {-1, 1}], #] &, 105, 3] (* Michael De Vlieger, Mar 17 2021 *)
  • PARI
    for(n=3,88,my(d1=n-precprime(n-1),d2=nextprime(n+1)-n);print1(max(d1,d2),", ")) \\ Hugo Pfoertner, Mar 10 2021
  • Python
    from sympy import prevprime, nextprime
    for n in range(3, 1001):
        prevp = prevprime(n); nextp = nextprime(n)
        print(max(n - prevp, nextp - n))
    

Formula

a(n) = max{n - prevprime(n), nextprime(n) - n}.
Previous Showing 61-66 of 66 results.