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

A272863 Numerator of the ratio of consecutive prime gaps.

Original entry on oeis.org

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

Views

Author

Andres Cicuttin, Jun 21 2016

Keywords

Crossrefs

Cf. A000040, A001223, A274225 (denominators), A274263.
Cf. A184247 (primes of the form prime(k+1) when a(k)=1).

Programs

  • Magma
    [Numerator((NthPrime(n+2)-NthPrime(n+1))/(NthPrime(n+1)-NthPrime(n))): n in [1..100]]; // Vincenzo Librandi, Apr 27 2017
    
  • Mathematica
    Table[(Prime[j+2]-Prime[j+1])/(Prime[j+1]-Prime[j]),{j,1,120}]//Numerator
    Numerator[#[[2]]/#[[1]]]&/@Partition[Differences[Prime[Range[100]]],2,1] (* Harvey P. Dale, Dec 07 2022 *)
  • PARI
    a(n) = numerator((prime(n+2)-prime(n+1))/(prime(n+1)-prime(n))); \\ Michel Marcus, Apr 29 2017

Formula

a(n) = numerator((prime(n+2)-prime(n+1))/(prime(n+1)-prime(n))).
A001223(n) = Product_{k=1..n-1} a(k)/A274225(k). - Andres Cicuttin, Apr 26 2017
A000040(n) = 3 + Sum_{j=1..n-1} Product_{k=1..j} a(k)/A274225(k), for n>1. - Andres Cicuttin, Apr 26 2017

A184248 Primes, q, such that for three consecutive primes, p, q & r, with p

Original entry on oeis.org

3, 5, 7, 13, 19, 31, 43, 53, 61, 73, 103, 109, 139, 151, 157, 173, 181, 193, 199, 211, 229, 241, 257, 263, 271, 283, 313, 349, 373, 401, 421, 433, 463, 467, 491, 509, 523, 563, 571, 593, 601, 607, 619, 643, 653, 661, 733, 743, 761, 811, 823, 829, 859
Offset: 1

Views

Author

Robert G. Wilson v, Jan 10 2011

Keywords

Comments

The distance between the cited prime above to its immediate successor is divisible by the distance from that prime to its immediate predecessor.
Intersection(A184247, A184248): 5, 53, 157, 173, 211, .., = A006562: Balanced primes (of order 1).

Crossrefs

Cf. A184247.

Programs

  • Mathematica
    fQ[n_] := Block[{p = NextPrime[n, -1], q = n, r = NextPrime[n]}, IntegerQ[(r - q)/(q - p)]]; Select[ Prime@ Range@ 150, fQ]
    Transpose[Select[Partition[Prime[Range[200]],3,1],IntegerQ[(#[[3]]- #[[2]])/ (#[[2]]-#[[1]])]&]][[2]] (* Harvey P. Dale, Mar 30 2014 *)

A179780 Primes, q, such that for three consecutive primes, p, q & r, with p

Original entry on oeis.org

23, 37, 47, 67, 79, 83, 89, 113, 127, 131, 163, 167, 233, 251, 277, 293, 307, 317, 331, 337, 353, 359, 367, 379, 383, 389, 409, 439, 443, 449, 479, 503, 547, 557, 577, 587, 613, 631, 647, 677, 683, 691, 701, 709, 719, 727, 739, 751, 757, 773, 787, 797, 839, 853, 863
Offset: 1

Views

Author

Robert G. Wilson v, Jan 10 2011

Keywords

Comments

The distance between the cited prime above to its immediate predecessor and the distance from that prime to its immediate successor is a ratio a/b with neither a nor b equal to 1.
Complement(A000040, A184247 & A184248)

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{p = NextPrime[n, -1], q = n, r = NextPrime[n]}, !IntegerQ[(q - p)/(r - q)] && !IntegerQ[(r - q)/(q - p)]]; Select[ Prime@ Range@ 150, fQ]
    Select[Partition[Prime[Range[200]],3,1],NoneTrue[{(#[[2]]-#[[1]])/ (#[[3]]- #[[2]]),(#[[3]]-#[[2]])/(#[[2]]-#[[1]])},IntegerQ]&][[All,2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 20 2016 *)
Showing 1-3 of 3 results.