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.

Previous Showing 31-40 of 150 results. Next

A051795 Doubly balanced primes: primes which are averages of both their immediate and their second neighbors.

Original entry on oeis.org

18731, 25621, 28069, 30059, 31051, 44741, 76913, 97441, 103669, 106681, 118831, 128449, 135089, 182549, 202999, 240491, 245771, 249199, 267569, 295387, 347329, 372751, 381401, 435751, 451337, 455419, 471521, 478099, 498301, 516877, 526441, 575231, 577873
Offset: 1

Views

Author

Harvey P. Dale, Dec 10 1999

Keywords

Comments

Could also be called overbalanced or [3,5]-balanced primes: balanced primes which are equally average of 3,5 consecutive prime neighbors as follows: a(n)=[q+a(n)+r]/3=[p+q+a(n)+r+s]/5 See 3-balanced=A006562;[3,5,7]-balanced=A081415. - Labos Elemer, Apr 02 2003
Numbers m such that A346399(m) is odd and >= 5. - Ya-Ping Lu, May 11 2024

Examples

			25621 belongs to the sequence because 25621 = (25609 + 25633)/2 = (25603 + 25609 + 25633 + 25639)/4.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[50000]],5,1],(#[[1]]+#[[5]])/2 == (#[[2]]+#[[4]])/2 == #[[3]]&]][[3]] (* Harvey P. Dale, Sep 13 2013 *)
  • Python
    from sympy import nextprime; p, q, r, s, t = 2, 3, 5, 7, 11
    while t < 580000:
        if p + t == q + s == 2*r: print(r, end = ', ')
        p, q, r, s, t = q, r, s, t, nextprime(t) # Ya-Ping Lu, May 11 2024

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

A125830 Primes for which the level is equal to 1 in A117563.

Original entry on oeis.org

5, 13, 23, 31, 47, 53, 73, 157, 173, 211, 233, 257, 263, 353, 373, 563, 593, 607, 619, 647, 653, 733, 947, 977, 1069, 1097, 1103, 1123, 1187, 1223, 1283, 1367, 1433, 1453, 1459, 1493, 1499, 1511, 1613, 1709, 1747, 1753, 1759, 1789, 1889, 1907, 2099, 2161
Offset: 1

Views

Author

Rémi Eismann, Feb 03 2007

Keywords

Comments

This sequence is equal to 13, 31, A006562, A117876, A118467, ..., A125623, ... Let p(n) denote the n-th prime. If 2 p(n) - p(n+1) is a prime, say p(n-i) and if p(n) has a level 1 in A117563, then we say that p(n) has level(1,i). Primes of level (1,1) form the sequence A006562. 13 and 31 have a level 1 but not sublevel i.

Crossrefs

A175309 a(n) = the smallest prime prime(k) such that prime(k+j) - prime(k+j-1) = prime(n+k+1-j) - prime(n+k-j) for all j with 1 <= j <= n.

Original entry on oeis.org

2, 3, 5, 18713, 5, 683747, 17, 98303867, 13, 60335249851, 137, 1169769749111, 8021749, 3945769040698829, 1071065111, 159067808851610411, 1613902553, 6919940122097246303, 1797595814863
Offset: 1

Views

Author

Leroy Quet, Mar 27 2010

Keywords

Comments

From M. F. Hasler, Apr 02 2010: (Start)
Also: Start of the first sequence of n+1 consecutive primes symmetrically distributed w.r.t. their barycenter, e.g., [2,3], [3,5,7], [5,7,11,13], [18713, 18719, 18731, 18743, 18749]. With this definition, it would make sense to prefix the sequence with an initial term a(0)=2.
Sequence A081235 (or A055382, which is essentially the same) consists of every other term of this sequence. (End)
a(19) = 1797595814863, a(21) = 633925574060671, a(23) = 22930603692243271. - Tomáš Brada, May 25 2020

Crossrefs

Programs

  • Mathematica
    A175309[n_] := Module[{k},
       k = 1; While[! AllTrue[Range[n], Prime[k+#] - Prime[k+#-1] ==
            Prime[n+k+1-#] - Prime[n+k-#] &], k++]; Return[Prime[k]]];
    Table[A175309[n], {n, 1, 7}]  (* Robert Price, Mar 27 2019 *)
  • PARI
    a(n)={ my( last=vector(n++,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
    
  • PARI
    isok(p, n) = {my(k=primepi(p)); for (j=1, n, if (prime(k+j) - prime(k+j-1) != prime(n+k+1-j) - prime(n+k-j), return (0));); return (1);} \\ Michel Marcus, Apr 08 2017

Formula

a(2n-1) = A081235(n) (= A055382(n) for n>1). - M. F. Hasler, Apr 02 2010

Extensions

Terms through a(12) were calculated by (in alphabetical order) Franklin T. Adams-Watters, Hans Havermann and D. S. McNeil
Minor edits by N. J. A. Sloane, Apr 02 2010
a(14) from Dmitry Petukhov, added by Max Alekseyev, Nov 03 2014
a(16) from BOINC project, added by Dmitry Petukhov, Apr 06 2017
a(18)-a(19) from SPT test project, added by Dmitry Petukhov, Mar 16 2025

A046869 Good primes (version 1): prime(n)^2 > prime(n-1)*prime(n+1).

Original entry on oeis.org

5, 11, 17, 29, 37, 41, 53, 59, 67, 71, 79, 97, 101, 107, 127, 137, 149, 157, 163, 173, 179, 191, 197, 211, 223, 227, 239, 251, 257, 263, 269, 277, 281, 307, 311, 331, 347, 367, 373, 379, 397, 419, 431, 439, 457, 461, 479, 487, 499, 521, 541
Offset: 1

Views

Author

Keywords

Comments

Also called geometrically strong primes. - Amarnath Murthy, Mar 08 2002
The idea can be extended by defining a geometrically strong prime of order k to be a prime that is greater than the geometric mean of r neighbors on both sides for all r = 1 to k but not for r = k+1. Similar generalizations can be applied to the sequence A051634. - Amarnath Murthy, Mar 08 2002
It appears that a(n) ~ 2*prime(n). - Thomas Ordowski, Jul 25 2012
Conjecture: primes p(n) such that 2*p(n) >= p(n-1) + p(n+1). - Thomas Ordowski, Jul 25 2012
Probably {3,7,23} U {good primes} = {primes p(n) > 2/(1/p(n-1) + 1/p(n+1))}. - Thomas Ordowski, Jul 27 2012
Except for A001359(1), A001359 is a subsequence. - Chai Wah Wu, Sep 10 2019

Examples

			37 is a member as 37^2 = 1369 > 31*41 = 1271.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Section A14.

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [2..100] | NthPrime(n)^2 gt NthPrime(n-1)*NthPrime(n+1)]; // Bruno Berselli, Oct 23 2012
  • Maple
    with(numtheory): a := [ ]: P := [ ]: M := 300: for i from 2 to M do if p(i)^2>p(i-1)*p(i+1) then a := [ op(a),i ]; P := [ op(P),p(i) ]; fi; od: a; P;
  • Mathematica
    Do[ If[ Prime[n]^2 > Prime[n - 1]*Prime[n + 1], Print[ Prime[n] ] ], {n, 2, 100} ]
    Transpose[Select[Partition[Prime[Range[300]],3,1],#[[2]]^2>#[[1]]#[[3]]&]][[2]] (* Harvey P. Dale, May 13 2012 *)
    Select[Prime[Range[2, 100]], #^2 > NextPrime[#]*NextPrime[#, -1] &] (* Jayanta Basu, Jun 29 2013 *)
  • PARI
    forprime(n=o=p=3,999,o+0<(o=p)^2/(p=n) & print1(o", "))
    isA046869(p)={ isprime(p) & p^2>precprime(p-1)*nextprime(p+1) } \\ M. F. Hasler, Jun 15 2011
    

Extensions

Corrected and extended by Robert G. Wilson v, Dec 06 2000
Edited by N. J. A. Sloane at the suggestion of Giovanni Resta, Aug 20 2007

A373820 Run-lengths (differing by 0) of antirun-lengths (differing by > 2) of odd primes.

Original entry on oeis.org

2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Jun 22 2024

Keywords

Comments

Run-lengths of the version of A027833 with 1 prepended.

Examples

			The antiruns of odd primes (differing by > 2) begin:
   3
   5
   7  11
  13  17
  19  23  29
  31  37  41
  43  47  53  59
  61  67  71
  73  79  83  89  97 101
 103 107
 109 113 127 131 137
 139 149
 151 157 163 167 173 179
 181 191
 193 197
 199 211 223 227
 229 233 239
 241 251 257 263 269
 271 277 281
with lengths:
1, 1, 2, 2, 3, 3, 4, 3, 6, 2, 5, 2, 6, 2, 2, ...
with runs:
  1  1
  2  2
  3  3
  4
  3
  6
  2
  5
  2
  6
  2  2
  4
  3
  5
  3
  4
with lengths a(n).
		

Crossrefs

Run-lengths of A027833 (if we prepend 1), partial sums A029707.
For runs we have A373819, run-lengths of A251092.
Positions of first appearances are A373827, sorted A373826.
A000040 lists the primes.
A001223 gives differences of consecutive primes, run-lengths A333254, run-lengths of run-lengths A373821.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
For composite runs: A005381, A054265, A068780, A373403, A373404.

Programs

  • Mathematica
    Length/@Split[Length/@Split[Select[Range[3,1000],PrimeQ],#2-#1>2&]//Most]//Most

A090403 Balanced primes: Primes which are both the arithmetic mean and median of a sequence of 2k+1 consecutive primes, for some k>0.

Original entry on oeis.org

5, 17, 29, 37, 53, 71, 79, 89, 137, 149, 151, 157, 173, 179, 193, 211, 227, 229, 257, 263, 281, 349, 353, 359, 373, 383, 397, 409, 419, 421, 433, 439, 487, 491, 563, 577, 593, 607, 631, 643, 653, 659, 677, 701, 709, 733, 751, 757, 787, 823, 827, 877, 947, 953
Offset: 1

Views

Author

Farideh Firoozbakht, Dec 07 2003

Keywords

Comments

Union, for all k>0, of (2k+1)-balanced prime numbers, i.e., balanced prime of order k, which are primes p_n such that (2k+1)*p_n = Sum_{i=n-k..n+k} p_i, where p_i is the i-th prime.

Examples

			17 is in the sequence because 17 = (7 + 11 + 13 + 17 + 19 + 23 + 29)/7, (k = 3).
29 is in the sequence because 29 = (5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59)/15, (k = 7).
37 is a member because 37 = (7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59 + 61 + 67 + 71)/17; 7 & 71 are eight primes away from 37.
		

Crossrefs

Programs

  • Mathematica
    t[n_] := (For[k=1, !(SameQ[1/(2k+1)Sum[Prime[i], {i, n-k, n+k}], Prime[n]])&& k < n-1, k++ ];k);b[n_] := If[t[n]
    				
  • PARI
    is_A090403(p)={my(s=0,n); isprime(p) & for(k=1,-1+n=primepi(p),(s+=prime(n+k)+prime(n-k)-2*p)||return(1);s>p & return)} \\ M. F. Hasler, Oct 21 2012

Extensions

Definition corrected by Franklin T. Adams-Watters, Apr 13 2006
Edited by M. F. Hasler, Oct 21 2012

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

A181424 Primes p such that p and the two previous primes are in arithmetic progression.

Original entry on oeis.org

7, 59, 163, 179, 223, 263, 269, 379, 569, 599, 613, 659, 739, 953, 983, 1109, 1129, 1193, 1229, 1373, 1523, 1753, 1759, 1913, 2293, 2423, 2683, 2909, 2969, 3313, 3319, 3643, 3739, 4019, 4421, 4463, 4603, 4663, 4703, 4999, 5113, 5119, 5309, 5393, 5399
Offset: 1

Views

Author

Carmine Suriano, Oct 18 2010

Keywords

Comments

Call d(i)=p(i+2)-p(i+1) and dd(i)=d(i+1)-d(i) then dd(i)=0.
All related first differences are multiples of 6 except the first one, which is 2.

Examples

			a(7)=269 since d(269,263)=6 and d(263,257)=6 and their difference is 0.
		

Crossrefs

Programs

  • Haskell
    a181424 = a000040 . (+ 2) . a064113  -- Reinhard Zumkeller, Jan 20 2012
  • Mathematica
    Select[Partition[Prime[Range[750]],3,1],Length[Union[Differences[#]]]==1&][[;;,3]] (* Harvey P. Dale, Oct 09 2023 *)

Formula

a(n) = A000040(A064113(n) + 2). - Reinhard Zumkeller, Jan 20 2012

A054342 First occurrence of distances of equidistant lonely primes. Each equidistant prime is at the same distance (or has the same gap) from the preceding prime and the next prime.

Original entry on oeis.org

5, 53, 211, 20201, 16787, 69623, 255803, 247141, 3565979, 6314447, 4911311, 12012743, 23346809, 43607429, 34346287, 36598607, 51042053, 460475569, 652576429, 742585297, 530324449, 807620777, 2988119339, 12447231899, 383204683, 4470608101, 5007182863, 36589015601
Offset: 1

Views

Author

Harvey P. Dale, May 06 2000

Keywords

Comments

Or, least balanced primes: starting with 2nd term, 53, the smallest prime such that the distances to the next smallest and next largest primes are both equal to 6n.
The distances corresponding to the above terms are 2, 6, 12, 18, 24, ..., 192, 198, 204, 210, 218, 224.
a(1) is the smallest prime p such that {p-2, p, p+2} are three consecutive primes. For n>1, a(n) is the smallest prime p such that {p-6*(n-1), p, p+6*(n-1)} are three consecutive primes. - Jeppe Stig Nielsen, Apr 16 2022

Examples

			211 is an equidistant lonely prime with distance 12. This is the first occurrence of the distance 12, thus 211 is in the sequence.
20201 is a least balanced prime because it is the third term in the sequence and is separated from both the next lower and next higher primes by 3 * 6 = 18.
Here is the beginning of the table of equidistant lonely primes.
Equivalent to 3 consecutive primes in arithmetic progression.
* indicates a maximal gap. This table gives rise to A058867, A058868 and the present sequence.
  Gap  First occurrence
  ---  ----------------
    2*         5
    6*        53
   12*       211
   18      20201
   24*     16787
   30*     69623
   36     255803
   42*    247141
   48*   3565979
   54    6314447
   60*   4911311
   66*  12012743
   72*  23346809
   78   43607429
   84*  34346287
   90*  36598607
   96*  51042053
  102  460475569
  108  652576429
		

Crossrefs

Formula

a(1) = A052187(1) + 2. For n>1, a(n) = A052187(n) + 6*(n-1). - Jeppe Stig Nielsen, Apr 16 2022

Extensions

More terms from Jud McCranie, Jun 13 2000
Further terms from Harvey Dubner (harvey(AT)dubner.com), Sep 11 2004
Entry revised by N. J. A. Sloane, Jul 23 2006
4 further terms from Walter Neumann (neumann(AT)math.columbia.edu), Aug 14 2006
a(28) corrected, and terms after a(28) moved from Data section to b-file by Jeppe Stig Nielsen, Apr 16 2022
Previous Showing 31-40 of 150 results. Next