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

A084299 Smallest primes such that the subsequent terms of consecutive prime differences (A001223) modulo 6 (A054763) displays repeatedly n times a {0,2,4} pattern of remainders of differences.

Original entry on oeis.org

83, 2903, 5897, 319499, 346943, 7974179, 15262433, 33954251, 5521833683, 83993232497, 848099080883, 1293322433639
Offset: 1

Views

Author

Labos Elemer, Jun 02 2003

Keywords

Examples

			For n=1: a(1) = 83 is followed by [6,8,4].
For n=2: a(2) = 2903 is followed by [6,2,4,18,2,4].
For n=3: a(3) = 5897 is followed by [6,20,4,12,14,28,6,20,4].
For n=4: a(4) = 319499 is followed by [12,8,22,6,20,10,12,2,10,6,32,34].
For n=5: a(5) = 346943 is followed by [18,2,40,....,30,2,10] differences corresponding to n "wavelet" of [0,2,4] remainders modulo 6.
		

Crossrefs

Programs

  • Mathematica
    (* generates a(5) *) d[x_] := Prime[x+1]-Prime[x]; md[x_] := Mod[Prime[x+1]-Prime[x], 6]; h={k1=0, k2=2, k3=4}; k=0; Do[If[Equal[md[n], k1]&&Equal[md[n+1], k2]&& Equal[md[n+2], k3]&&Equal[md[n+3], k1]&&Equal[md[n+4], k2]&&Equal[md[n+5], k3] &&Equal[md[n+6], k1]&&Equal[md[n+7], k2]&&Equal[md[n+8], k3] &&Equal[md[n+9], k1]&&Equal[md[n+10], k2]&&Equal[md[n+11], k3]&& Equal[md[n+12], k1]&&Equal[md[n+13], k2]&&Equal[md[n+14], k3], k=k+1; Print[{k, n, Prime[n], Table[md[n+j], {j, -1, 15}], Table[d[n+j], {j, -1, 15}]}]], {n, 2, 10000000}]
  • PARI
    lista(pmax) = {my(rec = 0, m = 0, c = 0, prv = 2, p0 = 0, d); forprime(p = 3, pmax, d = (p-prv)%6; if(d == 0 && m == 0, p0 = prv); if(d == c, m++; c = (c+2)%6; if(!(m%3) && m/3 > rec, print1(p0, ", "); rec++; m = 0), if(d == 0, p0 = prv; c = 2; m = 1, c = 0; m = 0)); prv = p);} \\ Amiram Eldar, Nov 04 2024

Extensions

a(9)-a(12) from Amiram Eldar, Nov 04 2024

A263049 a(n) = smallest prime p(k) such that the gaps between the primes p(k), p(k+1), p(k+2), ..., p(k+n) are 2n, 2n-2, ... 6, 4, 2.

Original entry on oeis.org

3, 7, 31, 1979, 41203, 752251, 5647457, 32465047, 245333233, 245333213, 27797667517, 196559847120517, 3040284075731561, 253253149671986983
Offset: 1

Views

Author

Vasily Danilov, Oct 08 2015

Keywords

Examples

			Consider the consecutive primes 1979, 1987, 1993, 1997, 1999. The gaps are 8, 6, 4, 2, and this does not occur for any prime smaller than 1979, so a(4)=1979.
		

Crossrefs

Cf. A016045.

Extensions

a(12)-a(13) from Dmitry Petukhov, Oct 08 2015
a(14) from Dmitry Petukhov, Jul 09 2016

A094749 Triangle read by rows in which the n-th row contains the least set of n successive primes whose successive difference forms an arithmetic progression with common difference 2, (successive even numbers).

Original entry on oeis.org

2, 3, 5, 5, 7, 11, 17, 19, 23, 29, 347, 349, 353, 359, 367, 2903, 2909, 2917, 2927, 2939, 2953, 15373, 15377, 15383, 15391, 15401, 15413, 15427, 128981, 128983, 128987, 128993, 129001, 129011, 129023, 129037, 95285633, 95285639, 95285647, 95285657
Offset: 1

Views

Author

Amarnath Murthy, May 24 2004

Keywords

Comments

The difference between the first two primes in each row does not have to be two; what is required is that the second differences between the primes in each row are all twos. - Harvey P. Dale, Aug 09 2020

Examples

			2
3 5
5 7 11
17 19 23 29
...
		

Crossrefs

Programs

  • Mathematica
    Module[{prs=Prime[Range[551*10^4]],nn=9},Join[{2,3,5},Table[ SelectFirst[ Partition[ prs,n,1],Union[Differences[#,2]]=={2}&],{n,3,nn}]]// Flatten] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 09 2020 *)

Extensions

More terms from David Wasserman, Jun 07 2007

A349121 a(n) is the smallest prime p, such that p + k + k^2 are consecutive primes for 0 <= k <= n, but not for k>n.

Original entry on oeis.org

3, 5, 17, 347, 13901, 665111, 128981, 113575727, 2426256797, 137168442221, 4656625081181, 101951758179851, 484511389338941, 221860944705726407
Offset: 1

Views

Author

Marc Morgenegg, Nov 08 2021

Keywords

Comments

a(n) is the smallest prime followed by exactly n prime gaps in arithmetic progression with a common difference of 2 and starting with prime gap 2.

Examples

			a(4)=347, because it is the smallest prime such that 347 + 2 = 349, 349 + 4 = 353, 353 + 6 = 359, 359 + 8 = 367 are 5 consecutive primes.
		

Crossrefs

Cf. A016045, A001223 (prime gaps), A036263 (2nd differences), A158939 (monotonic increasing).

Programs

  • Mathematica
    Table[k=2;While[Flatten[k+(s={Range[0,n]})+s^2]!=NextPrime[k,Range[0,n]]||NextPrime[k,n+1]==k+n+1+(n+1)^2,k=NextPrime@k];k,{n,7}] (* Giorgos Kalogeropoulos, Nov 10 2021 *)
  • PARI
    isok(p, n) = my(q=p); for (k=1, n, my(r = p+k+k^2); if (nextprime(q+1) != r, return (0)); q=r); return(1);
    a(n) = my(p=2); while (!isok(p, n), p=nextprime(p+1)); p; \\ Michel Marcus, Nov 09 2021

A090870 a(n) is the smallest m such that d(m+k-1) = 2k for k = 1, ..., n where d(t)= prime(t+1) - prime(t) (differences of consecutive primes in arithmetic progression).

Original entry on oeis.org

2, 3, 7, 69, 1642, 12073, 12073, 6496152, 118033638, 5575956036, 165534366186, 3265469041280, 14779996741980, 5701362336480884
Offset: 1

Views

Author

Farideh Firoozbakht, Dec 11 2003

Keywords

Comments

Is this sequence infinite?

Examples

			a(8) = 6496152 because prime(6496152) = 113575727 and 113575727, 113575729, 113575733, 113575739, 113575747, 113575757, 113575769, 113575783, and 113575799 are nine consecutive primes with differences respectively 2, 4, 6, 8, 10, 12, 14, 16.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (For[m=1, !Sum[(d[m+k-1]-2k)^2, {k, n}]==0, m++ ];m); Do[Print[a[n]], {n, 8}]

Formula

a(n) = primePi(A016045(n)).

Extensions

Extended and edited by T. D. Noe, May 23 2011
a(11)-a(14) from Amiram Eldar, Sep 06 2024
Showing 1-5 of 5 results.