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.

A270819 a(n) is the number of arithmetic progressions of length 3 among the quadratic residues modulo prime(n).

This page as a plain text file.
%I A270819 #7 Mar 25 2016 06:49:57
%S A270819 0,0,0,0,10,12,16,36,44,84,90,144,160,210,230,312,406,420,528,560,576,
%T A270819 702,820,880,1056,1200,1224,1378,1404,1456,1890,2080,2176,2346,2664,
%U A270819 2700,2964,3240,3320,3612,3916,3960,4370,4416,4704,4752,5460,5994,6328,6384,6496
%N A270819 a(n) is the number of arithmetic progressions of length 3 among the quadratic residues modulo prime(n).
%C A270819 Wraparound progressions as well as decreasing progressions are counted.
%D A270819 R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see Exercise 2.29 p. 111.
%F A270819 a(n) = (prime(n)-1)*floor((prime(n)-2)/8).
%e A270819 For p=prime(5)=11, whose quadratic residues are (1,3,4,5,9), some examples of 3-term arithmetic progressions are (3,4,5), (4,9,3) and (5,4,3).
%t A270819 Table[(# - 1) Floor[(# - 2)/8] &@ Prime@ n, {n, 51}] (* _Michael De Vlieger_, Mar 23 2016 *)
%o A270819 (PARI) a(n) = my(p=prime(n)); (p-1)*((p-2)\8);
%Y A270819 Cf. A063987.
%K A270819 nonn
%O A270819 1,5
%A A270819 _Michel Marcus_, Mar 23 2016