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 16 results. Next

A006562 Balanced primes (of order one): primes which are the average of the previous prime and the following prime.

Original entry on oeis.org

5, 53, 157, 173, 211, 257, 263, 373, 563, 593, 607, 653, 733, 947, 977, 1103, 1123, 1187, 1223, 1367, 1511, 1747, 1753, 1907, 2287, 2417, 2677, 2903, 2963, 3307, 3313, 3637, 3733, 4013, 4409, 4457, 4597, 4657, 4691, 4993, 5107, 5113, 5303, 5387, 5393
Offset: 1

Views

Author

Keywords

Comments

Subsequence of A075540. - Franklin T. Adams-Watters, Jan 11 2006
This subsequence of A125830 and of A162174 gives primes of level (1,1): More generally, the i-th prime p(i) is of level (1,k) if and only if it has level 1 in A117563 and 2 p(i) - p(i+1) = p(i-k). - Rémi Eismann, Feb 15 2007
Note the similarity between plots of A006562 and A013916. - Bill McEachen, Sep 07 2009
Balanced primes U strong primes = good primes. Or, A006562 U A051634 = A046869. - Juri-Stepan Gerasimov, Mar 01 2010
Primes prime(n) such that A001223(n-1) = A001223(n). - Irina Gerasimova, Jul 11 2013
Numbers m such that A346399(m) is odd and >= 3. - Ya-Ping Lu, Dec 26 2021 and May 07 2024
"Balanced" means that the next and preceding gap are of the same size, i.e., the second difference A036263 vanishes; so these are the primes whose indices are 1 more than indices of zeros in A036263, listed in A064113. - M. F. Hasler, Oct 15 2024
Primes which are the average of three consecutive primes. - Peter Schorn, Apr 30 2025

Examples

			5 belongs to the sequence because 5 = (3 + 7)/2. Likewise 53 = (47 + 59)/2.
5 belongs to the sequence because it is a term, but not first or last, of the AP of consecutive primes (3, 5, 7).
53 belongs to the sequence because it is a term, but not first or last, of the AP of consecutive primes (47, 53, 59).
257 and 263 belong to the sequence because they are terms, but not first or last, of the AP of consecutive primes (251, 257, 263, 269).
		

References

  • A. Murthy, Smarandache Notions Journal, Vol. 11 N. 1-2-3 Spring 2000.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 134.

Crossrefs

Primes A000040 whose indices are 1 more than A064113, indices of zeros in A036263 (second differences of the primes).
Cf. A225494 (multiplicative closure); complement of A178943 with respect to A000040.
Cf. A055380, A051795, A081415, A096710 for other balanced prime sequences.

Programs

  • Haskell
    a006562 n = a006562_list !! (n-1)
    a006562_list = filter ((== 1) . a010051) a075540_list
    -- Reinhard Zumkeller, Jan 20 2012
    
  • Haskell
    a006562 n = a006562_list !! (n-1)
    a006562_list = h a000040_list where
       h (p:qs@(q:r:ps)) = if 2 * q == (p + r) then q : h qs else h qs
    -- Reinhard Zumkeller, May 09 2013
    
  • Magma
    [a: n in [1..1000] | IsPrime(a) where a is NthPrime(n)-NthPrime(n+1)+NthPrime(n+2)]; // Vincenzo Librandi, Jun 23 2016
    
  • Mathematica
    Transpose[ Select[ Partition[ Prime[ Range[1000]], 3, 1], #[[2]] ==(#[[1]] + #[[3]])/2 &]][[2]]
    p=Prime[Range[1000]]; p[[Flatten[1+Position[Differences[p, 2], 0]]]]
    Prime[#]&/@SequencePosition[Differences[Prime[Range[800]]],{x_,x_}][[All,2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 31 2019 *)
  • PARI
    betwixtpr(n) = { local(c1,c2,x,y); for(x=2,n, c1=c2=0; for(y=prime(x-1)+1,prime(x)-1, if(!isprime(y),c1++); ); for(y=prime(x)+1,prime(x+1)-1, if(!isprime(y),c2++); ); if(c1==c2,print1(prime(x)",")) ) } \\ Cino Hilliard, Jan 25 2005
    
  • PARI
    forprime(p=1,999, p-precprime(n-1)==nextprime(p+1)-p && print1(p",")) \\ M. F. Hasler, Jun 01 2013
    
  • PARI
    is(n)=n-precprime(n-1)==nextprime(n+1)-n && isprime(n) \\ Charles R Greathouse IV, Apr 07 2016
    
  • Python
    from sympy import nextprime; p, q, r = 2, 3, 5
    while q < 6000:
        if 2*q == p + r: print(q, end = ", ")
        p, q, r = q, r, nextprime(r) # Ya-Ping Lu, Dec 23 2021

Formula

2*p_n = p_(n-1) + p_(n+1).
Equals { p = prime(k) | A118534(k) = prime(k-1) }. - Rémi Eismann, Nov 30 2009
a(n) = A000040(A064113(n) + 1) = (A122535(n) + A181424(n)) / 2. - Reinhard Zumkeller, Jan 20 2012
a(n) = A122535(n) + A117217(n). - Zak Seidov, Feb 14 2013
Equals A145025 intersect A000040 = A145025 \ A024675. - M. F. Hasler, Jun 01 2013
Conjecture: Limit_{n->oo} n*(log(a(n)))^2 / a(n) = 1/2. - Alain Rocchelli, Mar 21 2024
Conjecture: The asymptotic limit of the average of a(n+1)-a(n) is equivalent to 2*(log(a(n)))^2. Otherwise formulated: 2 * Sum_{n=1..N} (log(a(n)))^2 ~ a(N). - Alain Rocchelli, Mar 23 2024

Extensions

Reworded comment and added formula from R. Eismann. - M. F. Hasler, Nov 30 2009
Edited by Daniel Forgues, Jan 15 2011

A118464 Primes p=prime(i) of level (1,5), i.e., such that A118534(i) = prime(i-5).

Original entry on oeis.org

13933, 23633, 28229, 49223, 71363, 79633, 81239, 90547, 96857, 97613, 108827, 115363, 117443, 126781, 130657, 133733, 153533, 157679, 176819, 186799, 197389, 206651, 221327, 222199, 228139, 246947, 266297, 272203, 276049, 279221, 282493, 290627, 292493, 296299
Offset: 1

Views

Author

Rémi Eismann, May 04 2006

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,5): If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(5061) = 49223 has level (1,5): prime(5062) = 49253 = 2*prime(5061) - prime(5061-5) = 2*prime(5061) - prime(5056).
		

Crossrefs

Programs

  • Mathematica
    With[{m = 5}, Prime@ Select[Range[m + 1, 3*10^4], If[MemberQ[{1, 2, 4}, #], 0, 2 Prime[#] - Prime[# + 1]] == Prime[# - m] &]] (* Michael De Vlieger, Jul 16 2017 *)
  • PARI
    lista(nn) = my(c=6, v=primes(6)); forprime(p=17, nn, if(2*v[c]-p==v[c=c%6+1], print1(precprime(p-1), ", ")); v[c]=p); \\ Jinyuan Wang, Jun 18 2021

Extensions

Edited by N. J. A. Sloane, May 14 2006
More terms from Rémi Eismann, May 21 2006
Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009

A118467 Primes p = prime(i) of level (1,3), i.e., such that A118534(i) = prime(i-3).

Original entry on oeis.org

619, 1069, 1459, 1499, 1759, 1789, 2861, 3331, 3931, 4177, 4801, 4831, 5419, 6229, 6397, 8431, 8893, 9067, 9631, 11003, 11131, 11789, 12619, 14251, 15331, 15889, 16661, 17683, 17939, 18269, 18553, 19219, 19391, 19507, 20029, 20759, 22039, 22159, 22171, 22549
Offset: 1

Views

Author

Rémi Eismann, May 24 2006

Keywords

Comments

If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(115) - prime(114) = 631 - 619 = 619 - 607 = prime(114) - prime(114-3).
		

Crossrefs

Subsequence of A125830 and A162174.
Cf. A006562 (primes of level (1,1)), A117078, A117563, A117876, A118464.

Programs

  • Mathematica
    Select[Partition[Prime[Range[2600]],5,1],#[[5]]-#[[4]]==#[[4]]-#[[1]]&][[All,4]] (* Harvey P. Dale, Aug 28 2021 *)

Extensions

Definition and comment reworded, following author's suggestions, by M. F. Hasler, Nov 30 2009

A119402 Primes p=prime(i) of level (1,11), i.e., such that A118534(i)=prime(i-11).

Original entry on oeis.org

576791, 3361517, 9433859, 10460719, 11630503, 11707537, 12080027, 19743677, 28716287, 33384517, 34961923, 36627659, 37776967, 38087983, 40794049, 45650359, 49152757, 52230229, 53152907, 53240927, 55036789, 56167103, 56177783, 57717749, 58804483, 71849423, 76119269
Offset: 1

Views

Author

Rémi Eismann and Fabien Sibenaler, Jul 25 2006

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,11): If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(240963) - prime(240962) = 3361601 - 3361517 = 3361517 - 3361433 = prime(240962) - prime(240962-11) and prime(240962) has level 1 in A117563, so prime(240962)=3361517 has level (1,11).
		

Crossrefs

Cf. A006562 (primes of level (1,1)), A117078, A117563, A006562, A117876, A118464, A118467.

Extensions

More terms from Fabien Sibenaler, Oct 20 2006
Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009

A119403 Primes p=prime(i) of level (1,10), i.e., such that A118534(i)=prime(i-10).

Original entry on oeis.org

745757, 1103639, 1583369, 1895359, 2124049, 3327419, 4234537, 4437779, 5071973, 6287647, 7702573, 8470927, 8675923, 9493151, 9750079, 10868203, 11213843, 14244173, 14796253, 14978893, 15611909, 16489273, 17528681, 18280771, 19125163, 19403831, 19631411, 21975167
Offset: 1

Views

Author

Rémi Eismann and Fabien Sibenaler, Jul 25 2006

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,10): If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(353166) - prime(353165) = 5072057 - 5071973 = 5071973 - 5071889 = prime(353165) - prime(353165-10) and prime(353165) has level 1 in A117563, so prime(353165)=5071973 has level (1,10).
		

Crossrefs

Cf. A117078, A117563, A006562 (primes of level (1,1)), A117876, A118464, A118467.

Programs

  • PARI
    lista(nn) = my(c=11, v=primes(11)); forprime(p=37, nn, if(2*v[c]-p==v[c=c%11+1], print1(precprime(p-1), ", ")); v[c]=p); \\ Jinyuan Wang, Jun 18 2021

Extensions

More terms from Fabien Sibenaler, Oct 20 2006
Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009

A119404 Primes p=prime(i) of level (1,9), i.e., such that A118534(i)=prime(i-9).

Original entry on oeis.org

678659, 855739, 1403981, 2366543, 2744783, 2830657, 3027539, 3317033, 4525909, 4676851, 5341463, 5819563, 7087123, 7181897, 8815663, 9324257, 9878929, 9976937, 10403251, 10440641, 10447457, 10766411, 10787377, 11829151, 11881957, 12539389, 14026433, 14087179
Offset: 1

Views

Author

Rémi Eismann and Fabien Sibenaler, Jul 25 2006

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,9): If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(780815) - prime(780814) = 11882071 - 11881957 = 11881957 - 11881843 = prime(780814) - prime(780814-9) and prime(780814) has level 1 in A117563, so prime(780814)=11881957 has level (1,9).
		

Crossrefs

Cf. A117078, A117563, A006562 (primes of level (1,1)), A117876, A118464, A118467.

Extensions

Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009

A125576 Primes p=prime(i) of level (1,15), i.e., such that A118534(i)=prime(i-15).

Original entry on oeis.org

264426203, 295902073, 361949821, 704544167, 1075639757, 1259347393, 1290546427, 1301756207, 1335396547, 1370742383, 1460811643, 1497078991, 1514647247, 1643839649, 1783137281, 2142070103, 2424093281, 2471124197, 2494743721, 2577014057, 2706824389, 2951139253
Offset: 1

Views

Author

Rémi Eismann and Fabien Sibenaler, Jan 27 2007

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,15): If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(16042282) - prime(16042281) = 295902247 - 295902073 = 295902073 - 295901899 = prime(16042281) - prime(16042281-15) and prime(16042281) has level 1 in A117563, so prime(16042281)=295902073 has level (1,15).
		

Crossrefs

Cf. A117078, A117563, A006562 (primes of level (1,1)), A117876, A118464, A118467, A119402, A119403, A119404.

Programs

  • PARI
    lista(nn) = my(c=16, v=primes(16)); forprime(p=59, nn, if(2*v[c]-p==v[c=c%16+1], print1(precprime(p-1), ", ")); v[c]=p); \\ Jinyuan Wang, Jun 18 2021

Extensions

Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009
Terms a(5) and beyond from b-file by Andrew Howroyd, Feb 05 2018

A125623 Primes p=prime(i) of level (1,16), i.e., such that A118534(i)=prime(i-16).

Original entry on oeis.org

356604959, 613768081, 709208323, 950803363, 979872743, 1174872271, 1186433617, 1625945609, 1796767963, 1840621901, 2348698453, 2547482281, 3385901059, 3446679371, 3512406283, 3735873397, 4080198391, 4106437259, 4319987921, 4695419887, 5285414713, 5288810297
Offset: 1

Views

Author

Rémi Eismann and Fabien Sibenaler, Jan 27 2007

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,16): If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(48470200) - prime(48470199) = 950803519 - 950803363 = 950803363 - 950803207 = prime(48470199) - prime(48470199-16) and prime(48470199) has level 1 in A117563, so prime(48470199) = 950803363 has level (1,16).
		

Crossrefs

Cf. A117078, A117563, A006562 (primes of level (1,1)), A117876, A118464, A118467, A119402, A119403, A119404.

Programs

  • PARI
    lista(nn) = my(v=primes(17)); forprime(p=61, nn, if(2*v[17]-p==v[1], print1(v[17], ", ")); v=concat(v[2..17], p)); \\ Jinyuan Wang, Jun 18 2021

Extensions

Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009

A125565 Primes p=prime(i) of level (1,12), i.e., such that A118534(i)=prime(i-12).

Original entry on oeis.org

15014557, 27001043, 29602093, 50234633, 87028433, 91814759, 94529221, 103336843, 112840309, 113774329, 113961299, 114887657, 115528969, 118974901, 129235273, 144352123, 146127721, 160370491, 163559197, 169274999, 188168059, 188895919, 191829409, 198823447
Offset: 1

Views

Author

Rémi Eismann, Jan 27 2007

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,12): If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(5316164) - prime(5316163) = 91814831 - 91814759 = 91814759 - 91814687 = prime(5316163) - prime(5316163-12) and prime(5316163) has level 1 in A117563, so prime(5316163)=91814759 has level (1,12).
		

Crossrefs

Cf. A006562 (primes of level (1,1)), A117078, A117563, A006562, A117876, A118464, A118467, A119402, A119403, A119404.

Extensions

Definition and comment reworded following suggestions from the author. - M. F. Hasler, Nov 30 2009

A125572 Primes p=prime(i) of level (1,13), i.e., such that A118534(i)=prime(i-13).

Original entry on oeis.org

35630467, 118877047, 123823081, 140061577, 155032793, 175204303, 184606997, 188871349, 189489733, 232093339, 244004749, 278518081, 309055367, 310542257, 313596551, 315659909, 329918227, 340761691, 389220347, 398329523, 411405833, 422745641, 480428801, 485608819
Offset: 1

Views

Author

Rémi Eismann and Fabien Sibenaler, Jan 27 2007

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,13): If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(10272256) - prime(10272255) = 184607153 - 184606997 = 184606997 - 184606841 = prime(10272255) - prime(10272255-13) and prime(10272255) has level 1 in A117563, so prime(10272255)=184606997 has level (1,13).
		

Crossrefs

Cf. A006562 (primes of level (1,1)), A117078, A117563, A117876, A118464, A118467, A119402, A119403, A119404.

Extensions

Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009
Showing 1-10 of 16 results. Next