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.

A054692 Endpoints for runs of consecutive primes mentioned in A054691.

Original entry on oeis.org

11, 29, 59, 101, 419, 809, 8819, 13679, 14867, 24917, 62927, 188831, 689459, 851801, 17384669, 30754487, 32825201, 136286441, 248644217, 255953429, 390821531, 698547257, 1256739791, 1535224751, 1899802577, 2466646361
Offset: 0

Views

Author

Jeff Burch, Apr 19 2000

Keywords

Extensions

a(10)-a(25) from Sean A. Irvine, Feb 18 2022

A036061 Increasing gaps among twin primes: the largest prime of the starting twin pair.

Original entry on oeis.org

5, 7, 19, 43, 73, 313, 349, 661, 2383, 5881, 13399, 18541, 24421, 62299, 187909, 687523, 688453, 850351, 2868961, 4869913, 9923989, 14656519, 17382481, 30752233, 32822371, 96894043, 136283431, 234966931, 248641039, 255949951, 390817729, 698542489, 2466641071
Offset: 1

Views

Author

Keywords

Comments

Has many terms in common with A054691, but neither of the two is a subsequence of the other one. - M. F. Hasler, May 07 2022

Crossrefs

Programs

  • Mathematica
    Block[{s = Select[Partition[Prime@ Range[10^7], 2, 1], Subtract @@ # == -2 &][[All, -1]], t}, t = Differences@ s; Map[s[[FirstPosition[t, #]]] &, Union@ FoldList[Max, t]][[All, 1]]] (* Michael De Vlieger, Jan 18 2019 *)

Formula

a(n) = A036062(n) - A036063(n).
a(n) = A113275(n) + 2.

Extensions

Terms 5, 7 prepended by Max Alekseyev, Nov 05 2015
a(17) corrected and a(31)-a(33) from Sean A. Irvine, Oct 21 2020

A054690 n consecutive primes differ by 4 or more starting at a(n), or n consecutive primes with no twin primes.

Original entry on oeis.org

7, 19, 43, 73, 73, 349, 349, 349, 349, 349, 349, 661, 661, 661, 661, 661, 661, 661, 661, 8629, 8629, 8629, 8629, 13399, 13399, 13399, 14629, 14629, 24421, 24421, 24421, 24421, 24421, 24421, 24421, 24421, 24421, 24421, 24421, 24421, 24421
Offset: 2

Views

Author

Jeff Burch, Apr 19 2000

Keywords

Crossrefs

Programs

  • Maple
    P:= select(isprime, [seq(i,i=3..10^7,2)]):
    A:= 'A':
    state:= 0: smax := 0:
    for i from 2 to nops(P) do
      if P[i] - P[i-1] >= 4 then
        state:= state + 1;
        if state > smax then smax:= state; A[state+1]:= P[i-state] fi
      else
        state:= 0;
      fi
    od:
    seq(A[i],i=2..smax+1); # Robert Israel, Jun 27 2017
  • Mathematica
    Prime[#]&/@With[{pd=If[#>2,1,0]&/@Differences[Prime[Range[3000]]]}, Flatten[ Table[ SequencePosition[pd,PadRight[{},n,1],1][[All,1]],{n,45}]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 29 2018 *)

A242459 Maximal differences of A029707.

Original entry on oeis.org

1, 2, 3, 4, 6, 12, 20, 24, 27, 29, 42, 54, 72, 75, 103, 128, 131, 151, 153, 162, 164, 181, 204, 208, 209, 211, 237, 265, 285, 286, 326, 335, 340, 356, 368, 392, 409, 432, 439, 441, 444, 446
Offset: 1

Views

Author

Jani Melik, May 15 2014

Keywords

Crossrefs

Programs

  • Mathematica
    nextLesserTwinPrime[p_Integer] := Block[{q = p + 2}, While[ NextPrime@ q - q > 2, q = NextPrime@ q]; q]; p = 2; q = 3; px = 1; qx = 2; mxd = 0; tpx = 0; lst = {}; While[p <
    5090000001, d = qx - px; If[ d > mxd, mxd = d; AppendTo[ lst, d]; Print@ d]; p = q; px = qx; q = nextLesserTwinPrime@ q; qx = PrimePi@ q; tpx++]; lst (* Robert G. Wilson v, May 21 2014 *)
  • Sage
    def A242459_list(n) :
       a = [ 1 ]
       st = 3
       for i in (4..n) :
          if (nth_prime(i+1)-nth_prime(i) == 2) :
             if i-st > a[len(a)-1] :
                a.append(i-st)
             st = i
       return(a)
    A242459_list(10^(5))

Formula

a(n) = primepi(next(A054691(n-1))) - primepi(A054691(n-1)) + 1 for n >= 2, where primepi = A000720 and next(k) is the least lesser of twin primes that is larger than k. - Amiram Eldar, May 19 2024

Extensions

a(20)-a(28) from Robert G. Wilson v, May 21 2014
a(29)-a(42) from Amiram Eldar, May 19 2024
Showing 1-4 of 4 results.