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.

A272527 Numbers k such that prime(k) - 2 is the average of four consecutive odd squares.

Original entry on oeis.org

9, 14, 20, 28, 36, 56, 67, 94, 124, 155, 173, 192, 213, 230, 253, 344, 395, 475, 504, 534, 596, 725, 759, 795, 1230, 1359, 1449, 1549, 1596, 1647, 1688, 1745, 1798, 2005, 2119, 2164, 2335, 2395, 2457, 2759, 2885, 2952, 3340, 3627, 3696, 3835, 3909, 3987, 4438
Offset: 1

Views

Author

Michel Lagneau, May 02 2016

Keywords

Comments

The numbers prime(k)- 2 are a subsequence of A173960 (averages of four consecutive odd squares, or numbers of form 4*m^2+8*m+9), and also subsequence of A040976 (numbers prime(n) - 2). So, a(n) are the indices k such prime(k) are of the form 4*m^2+8*m+11 with the corresponding m = {1, 2, 3, 4, 5, 7, 8, 10, 12, 14, 15, 16, 17, 18, 19, 23, 25, 28,...}.
The sequence A173960 and the subsequence prime(a(n)) - 2 appear in a diagonal straight line in the Ulam spiral (see the illustration).

Examples

			a(1) = 9 because prime(9) - 2 = 23 - 2 = 21, and (1^2 + 3^2 + 5^2 + 7^2)/4 = 21;
a(2) = 14 because prime(14) - 2 = 43 - 2 = 41, and (3^2 + 5^2 + 7^2 + 9^2)/4 = 41.
		

Crossrefs

Programs

  • Maple
    for n from 9 to 1000 do:
    p:=ithprime(n)-2:
    for m from 1 by 2 to p do:
      s:=(m^2+(m+2)^2+(m+4)^2+(m+6)^2)/4:
      if s=p then printf(`%d, `,n):else fi:
    od:
    od:
  • Mathematica
    PrimePi@ Select[(#^2 + (# + 2)^2 + (# + 4)^2 + (# + 6)^2)/4 &@ Range@ 210 + 2, PrimeQ] (* Michael De Vlieger, May 02 2016 *)