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 41-49 of 49 results.

A054830 Third term of weak prime sextet: p(m-1)-p(m-2) < p(m)-p(m-1) < p(m+1)-p(m) < p(m+2)-p(m+1) < p(m+3)-p(m+2).

Original entry on oeis.org

2917, 13477, 13907, 14957, 15383, 15391, 21407, 21563, 21871, 28283, 30881, 33211, 35597, 37699, 42227, 42577, 45827, 55667, 64667, 64927, 64937, 68213, 68219, 68903, 68909, 73951, 74209, 78593, 83101, 85523, 87323, 88007, 90917
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

A108415 a(n) = 1, 2 or 3 (resp.) if prime(n) is weak, balanced or strong (resp.).

Original entry on oeis.org

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

Views

Author

Zak Seidov, Jun 02 2005

Keywords

Comments

n >= 2: a(n) = 1, 2 or 3 (resp.) if n-th prime is in A051635, A006562 or A051634 (resp.).

Crossrefs

Programs

  • Maple
    p:= 2: q:= 3: r:= 5:
    for i from 2 to 200 do
      t:= q - (p+r)/2;
      A[i]:= piecewise(t<0,1,t=0,2,3);
      p:= q; q:= r; r:= nextprime(r);
    od:
    seq(A[i],i=2..200); # Robert Israel, Mar 25 2018
  • Mathematica
    A108415[n_]:=2+Sign[Prime[n]-1/2(Prime[n-1]+Prime[n+1])]

A175145 Primes associated with A175102.

Original entry on oeis.org

281, 311, 495511, 495557, 496187, 496229, 496259, 496303, 496333, 496343, 496399, 496439, 496459, 496499, 496549, 496583, 496631, 496763, 497153, 497177, 497239, 497261, 497279, 497291, 497297, 497303, 497411, 497417, 497449, 497461, 497479, 498073, 498119, 498181, 498227, 498259, 498331, 498361, 498391, 498409, 498803, 498881, 507607
Offset: 1

Views

Author

G. L. Honaker, Jr., Dec 02 2010

Keywords

Crossrefs

Programs

  • PARI
    my(q=3, r=2, s=0); forprime(p=5,default(primelimit),(s+=sign(r+0-2*(r=q)+q=p))||print1(r, ", "))

Extensions

More terms from Chris K. Caldwell

A349793 Primes which are the nearest integer to the harmonic mean of the previous prime and the following prime.

Original entry on oeis.org

3, 7, 13, 23, 47, 89, 157, 173, 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

Hugo Pfoertner, Nov 30 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Partition[Prime[Range[750]],3,1],Round[HarmonicMean[{#[[1]],#[[3]]}]]==#[[2]]&][[;;,2]] (* Harvey P. Dale, Dec 29 2024 *)
  • PARI
    a349793(limit) = {my(p1=2,p2=3); forprime(p3=5, limit, my(hm=round((2*p1*p3)/(p1+p3))); if(p2==hm, print1(p2,", ")); p1=p2;p2=p3)};
    a349793(5500)

A362017 a(n) is the leading prime in the n-th prime sublist defined in A348168.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 23, 29, 37, 53, 59, 67, 79, 89, 97, 127, 137, 149, 157, 163, 173, 179, 191, 197, 211, 223, 239, 251, 293, 307, 331, 347, 353, 359, 367, 397, 409, 419, 431, 439, 449, 457, 479, 521, 541, 557, 587, 631, 673, 683, 691, 701, 719, 787, 809, 821
Offset: 1

Views

Author

Ya-Ping Lu, Apr 04 2023

Keywords

Comments

If Conjecture 2 in A348168 is true, lim_{n->infinity} a(n)/prime(round((n-1)*e)+1) = 1, where e is Euler's number.
If a term p (>2) is from a single-prime sublist (A356271), then p is a weak prime (A051635) or a balanced prime (A006562). Otherwise, p is a strong prime (A051634).
The definition divides the primes into maximal sublists such that gaps between adjacent primes in a sublist are smaller than the gap that precedes the sublist and no larger than the first gap within the sublist. - Peter Munn, Jul 07 2025

Examples

			According to the definition in A348168, prime numbers are divided into sublists, L_1, L_2, L_3,..., in which L_n = [p(n,1), p(n,2), ..., p(n,m(n))], where p(n,k) is the k-th prime and m(n) the number of primes in the n-th sublist L_n. Thus, a(n) = p(n,1). The first sublist L_1 = [2]. If p(n,1) <= (prevprime(p(n,1)) + nextprime(p(n,1)))/2, then L_n has only 1 prime, p(n,1). Otherwise, m(n) is the largest integer such that g(n,1) >= g(n,i), where g(n,i) = p(n,i+1) - p(n,i) and 2 <= i <= m(n).
The first 32 primes, for example, are divided into 16 prime sublists:
  [2],
  [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].
The leading primes in these sublists are: 2, 3, 5, 7, 11, 17, 23, 29, 37, 53, 59, 67, 79, 89, 97, 127. Therefore, a(1) = 2, a(2) = 3, ..., and a(16) = 127.
		

Crossrefs

Programs

  • Python
    from sympy import nextprime; R = [2]; L = [2]
    for n in range(2, 57):
        p0 = L[-1]; p1 = nextprime(p0); M = [p1]; g0 = p1-p0; p = nextprime(p1); g1 = p-p1
        while g1 < g0 and p-p1 <= g1: M.append(p); p1 = p; p = nextprime(p)
        L = M; R.append(L[0])
    print(*R, sep =', ')

A054821 Third term of weak prime quartet: p(m-1)-p(m-2) < p(m)-p(m-1) < p(m+1)-p(m).

Original entry on oeis.org

23, 47, 89, 113, 233, 293, 317, 353, 359, 389, 409, 449, 467, 509, 577, 647, 683, 691, 839, 863, 887, 919, 1039, 1069, 1097, 1201, 1237, 1283, 1307, 1327, 1381, 1433, 1439, 1459, 1493, 1499, 1559, 1613, 1627, 1637, 1709, 1889, 2003, 2039, 2099, 2179
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Programs

  • Mathematica
    wpqQ[listn_]:=Module[{d=Differences[listn]},d[[1]]Harvey P. Dale, Apr 11 2011 *)

A054822 Fourth term of weak prime quartet: p(m-2)-p(m-3) < p(m-1)-p(m-2) < p(m)-p(m-1).

Original entry on oeis.org

29, 53, 97, 127, 239, 307, 331, 359, 367, 397, 419, 457, 479, 521, 587, 653, 691, 701, 853, 877, 907, 929, 1049, 1087, 1103, 1213, 1249, 1289, 1319, 1361, 1399, 1439, 1447, 1471, 1499, 1511, 1567, 1619, 1637, 1657, 1721, 1901, 2011, 2053, 2111, 2203
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[350]],4,1],Min[ Differences[ #,2]]> 1&]][[4]] (* Harvey P. Dale, May 24 2015 *)

A054823 First term of weak prime quintets: p(m+1)-p(m) < p(m+2)-p(m+1) < p(m+3)-p(m+2) < p(m+4)-p(m+3).

Original entry on oeis.org

347, 673, 1427, 1487, 1619, 2203, 2237, 2687, 2903, 2909, 4091, 4127, 4931, 5569, 5923, 6269, 6469, 6701, 6827, 8087, 8167, 8231, 8929, 10331, 10729, 11777, 12107, 12277, 13463, 13469, 13901, 13903, 14081, 14627, 14653, 14947, 14951, 15073
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

A155189 Square-weak primes.

Original entry on oeis.org

3, 5, 7, 13, 19, 23, 31, 43, 47, 53, 61, 73, 83, 89, 103, 109, 113, 131, 139, 151, 157, 167, 173, 181, 193, 199, 211, 229, 233, 241, 257, 263, 271, 283, 293, 313, 317, 337, 349, 353, 359, 373, 383, 389, 401, 409, 421, 433, 443, 449, 463, 467, 491, 503, 509, 523
Offset: 1

Views

Author

Keywords

Comments

5^2 = 25 < 29 = (3^2+7^2)/2, ...

Crossrefs

Programs

  • Mathematica
    lst={};Do[p0=Prime[n];p1=Prime[n+1];p2=Prime[n+2];If[p1^2<(p0^2+p2^2)/2,AppendTo[lst,p1]],{n,5!}];lst
    Select[Partition[Prime[Range[100]],3,1],#[[2]]^2<(#[[1]]^2+#[[3]]^2)/2&][[All,2]] (* Harvey P. Dale, May 01 2021 *)
Previous Showing 41-49 of 49 results.