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

A055381 Smallest composite k such that the n closest primes below and above k are symmetric about k.

Original entry on oeis.org

4, 9, 12, 30, 30, 165, 8021811, 1071065190, 1613902650, 1797595815015, 633925574060895, 22930603692243585, 5179852391836339140, 9648166508472058455
Offset: 1

Views

Author

Jud McCranie, Jun 23 2000

Keywords

Comments

Center of the smallest 2n-tuple of consecutive odd primes with symmetrical gaps (cf. A055382).

Examples

			The three primes on each side of 12 (13, 17, 19 and 11, 7, 5) are symmetrical with respect to the gaps, so a(3) = 12.
		

Crossrefs

Programs

  • Mathematica
    Table[i = n + 2;
     While[x =
       Differences@
        Flatten@{Table[NextPrime[i, k], {k, -n, -1}], i,
          Table[NextPrime[i, k], {k, 1, n}]}; x != Reverse[x],
    i++]; i, {n, 6}] (* Robert Price, Oct 12 2019 *)

Formula

a(n) = ( A055382(n) + A000040(A000720(A055382(n))+2n) ) / 2 = ( A055382(n) + A151800(...(A151800(A055382(n)))...) ) / 2, where A151800 is iterated 2n times. - Max Alekseyev, Jul 23 2015
a(n) = (A000040(m) + A000040(m+1))/2, where m = min( {k >= 2 : A359440(k) >= n-1} ). - Peter Munn, Jan 09 2023

Extensions

a(10) from Donovan Johnson, Mar 09 2008
a(11) from Dmitry Petukhov, added by Max Alekseyev, Aug 08 2014
a(12) computed from A055382(12) by Max Alekseyev, Jul 23 2015
Name clarified by Peter Munn, Jan 09 2023
a(13)-a(14) computed from A055382 by Dmitry Petukhov, Mar 25 2025

A081235 Smallest prime starting a sequence of 2n consecutive primes with symmetrical gaps about the center.

Original entry on oeis.org

2, 5, 5, 17, 13, 137, 8021749, 1071065111, 1613902553, 1797595814863, 633925574060671, 22930603692243271, 5179852391836338871, 9648166508472058129
Offset: 1

Views

Author

Keywords

Examples

			The first term is 2 since the 2 primes 2, 3 have a gap of 1, which is trivially symmetric about its center.
The second term is 5 since the 4 primes 5, 7, 11, 13 have gaps 2, 4, 2, which is symmetric about its center.
The twelve primes 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193 have gaps 2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2 - symmetric about the middle, so a(6) = 137.
		

Crossrefs

Programs

  • PARI
    A081235(n) = { my(last=vector(n*=2,i,prime(i)), m, i=Mod(n-2,n)); forprime(p=last[n],default(primelimit), m=last[1+lift(i+2)]+last[1+lift(i++)]=p; for(j=1,n\2,last[1+lift(i-j)]+last[1+lift(i+j+1)]==m||next(2)); return(last[1+lift(i+1)]))} \\ M. F. Hasler, Apr 02 2010

Formula

a(n) = A175309(2n-1) (= A055382(n) for n>1). [M. F. Hasler, Apr 02 2010]
a(n) = A000040(k), where k = least number such that A359440(k+n-1) >= n-1. - Peter Munn, Jan 05 2023

Extensions

a(11) from Dmitry Petukhov, added by Max Alekseyev, Aug 08 2014
a(12) from an anonymous participant of the project, added by Natalia Makarova, Jul 16 2015
a(13)-a(14) from SPT test project, added by Dmitry Petukhov, Mar 16 2025

A064101 Primes p = prime(k) such that prime(k) + prime(k+5) = prime(k+1) + prime(k+4) = prime(k+2) + prime(k+3).

Original entry on oeis.org

5, 7, 19, 31, 97, 131, 151, 293, 587, 683, 811, 839, 857, 907, 1013, 1097, 1279, 2347, 2677, 2833, 3011, 3329, 4217, 4219, 5441, 5839, 5849, 6113, 8233, 8273, 8963, 9433, 10301, 10427, 10859, 11953, 13513, 13597, 13721, 13931, 14713, 15629, 16057
Offset: 1

Views

Author

Robert G. Wilson v, Sep 17 2001

Keywords

Examples

			The first ten primes are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. Take just the fourth through the ninth and rearrange them such that the first pairs with the sixth, the second with the fifth and the third with the fourth as follows: 7 and 23, 11 and 19 and 13 and 17. All three pairs sum to 30. Therefore a(2) = 7.
		

Crossrefs

Programs

  • Maple
    A := {}: for n to 1000 do p1 := ithprime(n); p2 := ithprime(n+1); p3 := ithprime(n+2); p4 := ithprime(n+3); p5 := ithprime(n+4); p6 := ithprime(n+5); if `and`(p1+p6 = p2+p5, p2+p5 = p3+p4) then A := `union`(A, {p1}) end if end do; A := A;
  • Mathematica
    a = {0, 0, 0, 0, 0, 0}; Do[ a = Delete[ a, 1 ]; a = Append[ a, Prime[ n ] ]; If[ a[ [ 1 ] ] + a[ [ 6 ] ] == a[ [ 2 ] ] + a[ [ 5 ] ] == a[ [ 3 ] ] + a[ [ 4 ] ], Print[ a[ [ 1 ] ] ] ], {n, 1, 20000} ] (* RGWv *)
    Prime[Select[Range[100], Prime[#] + Prime[# + 5] == Prime[# + 1] + Prime[# + 4] && Prime[#] + Prime[# + 5] == Prime[# + 2] + Prime[# + 3] &]]
    Select[Partition[Prime[Range[2000]],6,1],#[[1]]+#[[6]]==#[[2]]+#[[5]] == #[[3]]+ #[[4]]&][[All,1]] (* Harvey P. Dale, Jan 16 2022 *)
  • PARI
    { n=0; default(primelimit, 1500000); for (k=1, 10^9, p1=prime(k) + prime(k + 5); p2=prime(k + 1) + prime(k + 4); p3=prime(k + 2) + prime(k + 3); if (p1==p2 && p2==p3, write("b064101.txt", n++, " ", prime(k)); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 07 2009

Formula

Primes p = prime(k) = A000040(k) such that A359440(k+2) >= 2. - Peter Munn, Jan 09 2023

A336967 Prime starting a sequence of 24 consecutive primes with symmetrical gaps about the center.

Original entry on oeis.org

22930603692243271, 34984922852185283, 60960572612579749, 226721453950385059, 301850075265898823, 310402815525745511, 341206644560627711, 357582484287837103, 481408770994035947, 492720459594614777, 528050771271601307, 587950582712698157, 675424273001524577
Offset: 1

Views

Author

Tomáš Brada, Aug 09 2020

Keywords

Crossrefs

Formula

Primes p = prime(k) = A000040(k) such that A359440(k+11) >= 11. - Peter Munn, Jan 09 2023

A336968 Prime starting a sequence of 22 consecutive primes with symmetrical gaps about the center.

Original entry on oeis.org

633925574060671, 2235053194261739, 3693434256575461, 6244996197964523, 7312449941282693, 11768508587048027, 12241378636561883, 12696156429346387, 13388148635660387, 14052415423668901, 18620445306703861, 19802687937976219, 22930603692243341, 23122811970297833
Offset: 1

Views

Author

Tomáš Brada, Aug 09 2020

Keywords

Crossrefs

Formula

Primes p = prime(k) = A000040(k) such that A359440(k+10) >= 10. - Peter Munn, Jan 09 2023

A064102 Primes p = prime(k) such that prime(k) + prime(k+7) = prime(k+1) + prime(k+6) = prime(k+2) + prime(k+5) = prime(k+3) + prime(k+4).

Original entry on oeis.org

17, 149, 677, 853, 1277, 5437, 6101, 13499, 13921, 19853, 22073, 41863, 49667, 51307, 51797, 55799, 61637, 66337, 83227, 91121, 100957, 103963, 109111, 113147, 128747, 136309, 137933, 148157, 158849, 163117, 167249, 179033, 205171, 208927
Offset: 1

Views

Author

Robert G. Wilson v, Sep 17 2001

Keywords

Examples

			17 + 43 = 19 + 41 = 23 + 37 = 29 + 31.
		

Crossrefs

Programs

  • Mathematica
    a = {0, 0, 0, 0, 0, 0, 0, 0}; Do[ a = Delete[ a, 1 ]; a = Append[ a, Prime[ n ] ]; If[ a[ [ 1 ] ] + a[ [ 8 ] ] == a[ [ 2 ] ] + a[ [ 7 ] ] == a[ [ 3 ] ] + a[ [ 6 ] ] == a[ [ 4 ] ] + a[ [ 5 ] ], Print[ a[ [ 1 ] ] ] ], {n, 1, 10^4} ]
    Select[Partition[Prime[Range[20000]],8,1],#[[1]]+#[[8]]==#[[2]]+#[[7]]==#[[3]]+#[[6]]==#[[4]]+#[[5]]&][[;;,1]] (* Harvey P. Dale, Jul 03 2025 *)
  • PARI
    { n=0; default(primelimit, 8300000); for (k=1, 10^9, p1=prime(k) + prime(k + 7); p2=prime(k + 1) + prime(k + 6); p3=prime(k + 2) + prime(k + 5); p4=prime(k + 3) + prime(k + 4); if (p1==p2 && p2==p3 && p3==p4, write("b064102.txt", n++, " ", prime(k)); if (n==400, break)) ) } \\ Harry J. Smith, Sep 07 2009

Formula

Primes p = prime(k) = A000040(k) such that A359440(k+3) >= 3. - Peter Munn, Jan 09 2023

A333977 Prime starting a sequence of 20 consecutive primes with symmetrical gaps about the center.

Original entry on oeis.org

1797595814863, 2375065608481, 4465545586753, 21818228348093, 67696772430071, 82116093014611, 155947272322087, 161980267642951, 169560139541641, 202619277419161, 285719200081877, 299828814652799, 314942862282899, 365706921997577
Offset: 1

Views

Author

Tomáš Brada, Sep 20 2020

Keywords

Crossrefs

Formula

Primes p = prime(k) = A000040(k) such that A359440(k+9) >= 9. - Peter Munn, Jan 09 2023

A064103 Primes p = p(k) such that p(k) + p(k+9) = p(k+1) + p(k+8) = p(k+2) + p(k+7) = p(k+3) + p(k+6) = p(k+4) + p(k+5).

Original entry on oeis.org

13, 139, 6091, 19843, 51787, 55793, 113143, 179029, 205157, 302551, 346361, 460949, 895799, 970447, 1150651, 1180847, 1697257, 1929553, 2334781, 2580631, 2797447, 3056561, 3086009, 3416717, 3598943, 4024667, 4026107, 4067123, 4077583, 4389503, 4541083, 4790503
Offset: 1

Views

Author

Robert G. Wilson v, Sep 17 2001

Keywords

Examples

			13 + 47 = 17 + 43 = 19 + 41 = 23 + 37 = 29 + 31.
		

Crossrefs

Programs

  • Mathematica
    a = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Do[ a = Delete[ a, 1 ]; a = Append[ a, Prime[ n ] ]; If[ a[ [ 1 ] ] + a[ [ 10 ] ] == a[ [ 2 ] ] + a[ [ 9 ] ] == a[ [ 3 ] ] + a[ [ 8 ] ] == a[ [ 4 ] ] + a[ [ 7 ] ] == a[ [ 5 ] ] + a[ [ 6 ] ], Print[ a[ [ 1 ] ] ] ], {n, 1, 3 10^5} ]

Formula

Primes p = prime(k) = A000040(k) such that A359440(k+4) >= 4. - Peter Munn, Jan 13 2023

Extensions

More terms from Sean A. Irvine, Jun 11 2023

A064104 Primes p = p(k) such that p(k) + p(k+11) = p(k+1) + p(k+10) = p(k+2) + p(k+9) = p(k+3) + p(k+8) = p(k+4) + p(k+7) = p(k+5) + p(k+6).

Original entry on oeis.org

137, 55787, 113131, 179021, 895789, 1150649, 3086003, 4026103, 4077559, 8021753, 8750857, 12577063, 14355559, 19136527, 19412863, 20065961, 21865339, 22633141, 25880177, 30404971, 33926159, 38202173, 41905891, 42925699
Offset: 1

Views

Author

Robert G. Wilson v, Sep 17 2001

Keywords

Examples

			137 + 193 = 139 + 191 = 149 + 181 = 151 + 179 = 157 + 173 = 163 + 167.
		

Crossrefs

Programs

  • Mathematica
    a = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Do[ a = Delete[ a, 1 ]; a = Append[ a, Prime[ n ] ]; If[ a[ [ 1 ] ] + a[ [ 12 ] ] == a[ [ 2 ] ] + a[ [ 11 ] ] == a[ [ 3 ] ] + a[ [ 10 ] ] == a[ [ 4 ] ] + a[ [ 9 ] ] == a[ [ 5 ] ] + a[ [ 8 ] ] == a[ [ 6 ] ] + a[ [ 7 ] ], Print[ a[ [ 1 ] ] ] ], {n, 1, 10^6} ]
    okQ[n_]:=Length[Union[Take[n,6]+Reverse[Take[n,-6]]]]==1; Transpose[ Select[Partition[Prime[Range[2700000]],12,1],okQ]][[1]] (* Harvey P. Dale, Apr 25 2011 *)

Formula

Primes p = prime(k) = A000040(k) such that A359440(k+5) >= 5. - Peter Munn, Jan 13 2023

A367848 Lengths >= 2 of symmetrical subsequences within the prime gaps sequence.

Original entry on oeis.org

2, 3, 5, 5, 3, 9, 5, 2, 3, 3, 3, 5, 3, 3, 5, 2, 11, 2, 3, 3, 2, 3, 2, 3, 2, 3, 5, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 2, 5, 2, 2, 3, 7, 3, 2, 3, 3, 5, 5, 7, 3, 3, 5, 2, 2, 3, 5, 3, 3, 3, 2, 5, 2, 3, 2, 2, 3, 7, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 5
Offset: 1

Views

Author

Tamas Sandor Nagy, Dec 02 2023

Keywords

Comments

Points in the primes gap sequence (A001223) are taken successively at a term and halfway between terms.
The lengths here are of subsequences made of 2 or more symmetrically placed, consecutive prime gaps around such a point.
Some points only have a subsequence of length 0 or 1 around them and they are ignored.
Will all odd numbers appear in this sequence?
Do the terms have a long-term average?

Examples

			The first lengths are as follows, around midpoints marked with ".",
  Gaps:  1   2   2   4   2   4   2    = A001223
             \_._/                  length 2 = a(1)
                 \___.___/          length 3 = a(2)
                 \_______._______/  length 5 = a(3)
		

Crossrefs

Programs

  • PARI
    diff(v) = vector(#v-1, i, v[i+1]-v[i]);
    issym(v) = if (#v>1, for (j=1, #v\2, if (v[j] != v[#v-j+1], return(0))); return(1));
    lista(nn) = my(v = diff(primes(nn))); for (len=2, #v, for (i=0, len\2, my(w = vector(len-2*i, j, v[i+j])); if (issym(w), print1(#w, ", "); break););); \\ Michel Marcus, Dec 05 2023
Showing 1-10 of 10 results.