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

A024675 Average of two consecutive odd primes.

Original entry on oeis.org

4, 6, 9, 12, 15, 18, 21, 26, 30, 34, 39, 42, 45, 50, 56, 60, 64, 69, 72, 76, 81, 86, 93, 99, 102, 105, 108, 111, 120, 129, 134, 138, 144, 150, 154, 160, 165, 170, 176, 180, 186, 192, 195, 198, 205, 217, 225, 228, 231, 236, 240, 246, 254, 260, 266, 270, 274, 279, 282, 288, 300
Offset: 1

Views

Author

Keywords

Comments

Sometimes called interprimes.
Where local maxima of A072681 occur: A072681(a(n))=A074927(n+1). - Reinhard Zumkeller, Mar 04 2009
Never prime, for that would contradict the definition. - Jon Perry, Dec 05 2012
A subset of A145025, obtained from that sequence by omitting the primes (which are barycenter of their neighboring primes). - M. F. Hasler, Jun 01 2013
Conjecture: Product_{k=1..n} a(k)/A028334(k+1) is an integer for every natural n. Cf. A352743. - Thomas Ordowski, Mar 31 2022
In contrast to the arithmetic mean, the geometric and the harmonic mean of two consecutive primes is never an integer. What is the first case where either of the two would differ from the arithmetic mean, i.e., this sequence? The existence of such a pair of primes is related to Legendre's conjecture, cf. link to discussion on the math-fun mailing list. - M. F. Hasler, Apr 07 2025

Crossrefs

Cf. A072568, A072569. Bisections give A058296, A079424.
Cf. A373699 (partial sums).

Programs

  • Maple
    seq( ( (ithprime(x)+ithprime(x+1))/2 ),x=2..40);
  • Mathematica
    Plus @@@ Partition[Table[Prime[n], {n, 2, 100}], 2, 1]/2
    ListConvolve[{1, 1}/2, Prime /@ Range[2, 70]] (* Jean-François Alcover, Jun 25 2013 *)
    Mean/@Partition[Prime[Range[2,70]],2,1] (* Harvey P. Dale, Jul 28 2020 *)
  • PARI
    for(X=2,50,print((prime(X)+prime(X+1))/2)) \\ Hauke Worpel (thebigh(AT)outgun.com), May 08 2008
    
  • PARI
    first(n)=my(v=primes(n+2)); vector(n,i,v[i+1]+v[i+2])/2 \\ Charles R Greathouse IV, Jun 25 2013
    
  • Python
    from sympy import prime
    def a(n): return (prime(n + 1) + prime(n + 2)) // 2
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 11 2017

Formula

a(n) = (prime(n+1)+prime(n+2))/2 = A001043(n+1)/2. - Omar E. Pol, Feb 02 2012
Conjecture: a(n) = ceiling(sqrt(prime(n+1)*prime(n+2))). - Thomas Ordowski, Mar 22 2013 [This requires gaps to be smaller than approximately sqrt(8p) and hence requires a result on prime gaps slightly stronger than that provided by the Riemann hypothesis. - Charles R Greathouse IV, Jul 13 2022]
Equals A145025 \ A006562 = A145025 \ A000040. - M. F. Hasler, Jun 01 2013

A072681 a(n) = (n - A007917(n)) * (A007918(n) - n).

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 3, 4, 3, 0, 1, 0, 3, 4, 3, 0, 1, 0, 3, 4, 3, 0, 5, 8, 9, 8, 5, 0, 1, 0, 5, 8, 9, 8, 5, 0, 3, 4, 3, 0, 1, 0, 3, 4, 3, 0, 5, 8, 9, 8, 5, 0, 5, 8, 9, 8, 5, 0, 1, 0, 5, 8, 9, 8, 5, 0, 3, 4, 3, 0, 1, 0, 5, 8, 9, 8, 5, 0, 3, 4, 3, 0, 5, 8, 9, 8, 5, 0, 7, 12, 15, 16, 15, 12, 7, 0, 3, 4, 3, 0, 1, 0
Offset: 2

Views

Author

Reinhard Zumkeller, Jul 01 2002

Keywords

Comments

a(n)=0 iff n is prime.
Local maxima occur at interprimes: a(A024675(n)) = A074927(n+1). - Reinhard Zumkeller, Mar 04 2009
Expanding upon the maxima comment, repetitive subset triplets (like 3,4,3) of form (k,k+1,k) occur when the middle value is a square. - Bill McEachen, Apr 14 2025

Crossrefs

Programs

  • Mathematica
    a[n_] := (n - NextPrime[n+1, -1])*(NextPrime[n] - n); Table[a[n], {n, 2, 103}] (* Jean-François Alcover, Jun 14 2013 *)

Formula

a(n) = A064722(n) * A007920(n).
a(n) = A064722(n) * (A072680(n) - A064722(n)).

A129783 Conjectured numbers n with the property that there exist two consecutive primes p and q such that pq + n is a square.

Original entry on oeis.org

1, 3, 4, 9, 10, 14, 16, 19, 21, 23, 25, 26, 29, 30, 34, 35, 36, 38, 43, 44, 46, 47, 49, 53, 58, 62, 64, 65, 66, 67, 68, 75, 77, 78, 81, 82, 83, 85, 86, 92, 94, 95, 100, 103, 106, 109, 110, 113, 115, 117, 118, 119, 121, 122, 125, 129, 134, 138, 139, 140, 143, 144, 146, 148
Offset: 1

Views

Author

Cino Hilliard, May 18 2007

Keywords

Comments

Complement of A129816. [From Omar E. Pol, Dec 26 2008]

Crossrefs

Cf. A129816. [From Omar E. Pol, Dec 26 2008]

Programs

  • PARI
    primesq(n,m) = \square of the form prime(x)*prime(x+1) + k {local(c,k,x,p1,p2,j); c=0; for(k=1,m, for(x=1,n, p1=prime(x); p2=(prime(x+1)); y=p1*p2+k; if(issquare(y), c++; print1(k","); break; ) ) ); c; }

Extensions

I don't know how many of the missing terms have been proved to be missing. Has it been proved that 2 is missing? - N. J. A. Sloane, May 20 2007

A076621 Least square greater than the product of two successive primes.

Original entry on oeis.org

9, 16, 36, 81, 144, 225, 324, 441, 676, 900, 1156, 1521, 1764, 2025, 2500, 3136, 3600, 4096, 4761, 5184, 5776, 6561, 7396, 8649, 9801, 10404, 11025, 11664, 12321, 14400, 16641, 17956, 19044, 20736, 22500, 23716, 25600, 27225, 28900, 30976, 32400, 34596, 36864
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 22 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Ceiling[Sqrt[Times@@#]]^2&/@Partition[Prime[Range[50]],2,1] (* Harvey P. Dale, Aug 26 2013 *)
  • Python
    from sympy import prime, primerange
    def aupton(terms):
        primes = list(primerange(3, prime(terms+1)+1))
        return [9] + [((p+q)//2)**2 for p, q in zip(primes[:-1], primes[1:])]
    print(aupton(43)) # Michael S. Branicky, Sep 16 2021

Formula

a(n) = A048761(A006094(n)).
a(n) = prime(n)*prime(n+1)+((prime(n)-prime(n+1))/2)^2 = A006094(n) + A074927(n) for n > 1.
a(n) = ((prime(n)+prime(n+1))/2)^2 for n > 1.
Showing 1-4 of 4 results.