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.

A069495 Squares which are the arithmetic mean of two consecutive primes.

Original entry on oeis.org

4, 9, 64, 81, 144, 225, 324, 441, 625, 1089, 1681, 2601, 3600, 4096, 5184, 6084, 8464, 12544, 13689, 16641, 19044, 19600, 25281, 27225, 28224, 29584, 36864, 38025, 39204, 45369, 46656, 47524, 51984, 56169, 74529, 87025, 88804, 91809, 92416, 95481, 103684
Offset: 1

Views

Author

Amarnath Murthy, Mar 30 2002

Keywords

Examples

			144 = (139 + 149)/2 is a member.
		

Crossrefs

Intersection of A000290 and A024675.

Programs

  • Maple
    a:= proc(n) option remember; local k, kk, p, q;
          for k from 1 +`if`(n=1, 1, iroot(a(n-1), 2))
          do kk:= k^2; p, q:= prevprime(kk), nextprime(kk);
             if (p+q)/2=kk then return kk fi
          od
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Dec 21 2013
  • Mathematica
    p = -1; Do[q = Prime[n]; If[ IntegerQ[ Sqrt[(p + q)/2]], Print[(p + q)/2]]; p = q, {n, 1, 10000} ]
    Select[Mean/@Partition[Prime[Range[11000]],2,1],IntegerQ[Sqrt[#]]&] (* Harvey P. Dale, Jan 23 2019 *)

Formula

a(n) = (A075190(n))^2. - Zak Seidov

Extensions

Edited and extended by Robert G. Wilson v, Apr 01 2002