The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A270819 a(n) is the number of arithmetic progressions of length 3 among the quadratic residues modulo prime(n). 0
 0, 0, 0, 0, 10, 12, 16, 36, 44, 84, 90, 144, 160, 210, 230, 312, 406, 420, 528, 560, 576, 702, 820, 880, 1056, 1200, 1224, 1378, 1404, 1456, 1890, 2080, 2176, 2346, 2664, 2700, 2964, 3240, 3320, 3612, 3916, 3960, 4370, 4416, 4704, 4752, 5460, 5994, 6328, 6384, 6496 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 COMMENTS Wraparound progressions as well as decreasing progressions are counted. REFERENCES R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see Exercise 2.29 p. 111. LINKS Table of n, a(n) for n=1..51. FORMULA a(n) = (prime(n)-1)*floor((prime(n)-2)/8). EXAMPLE 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). MATHEMATICA Table[(# - 1) Floor[(# - 2)/8] &@ Prime@ n, {n, 51}] (* Michael De Vlieger, Mar 23 2016 *) PROG (PARI) a(n) = my(p=prime(n)); (p-1)*((p-2)\8); CROSSREFS Cf. A063987. Sequence in context: A109604 A187710 A063096 * A031183 A265043 A158871 Adjacent sequences: A270816 A270817 A270818 * A270820 A270821 A270822 KEYWORD nonn AUTHOR Michel Marcus, Mar 23 2016 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 8 09:26 EDT 2024. Contains 375753 sequences. (Running on oeis4.)