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.

A212887 a(n) is the prime p corresponding to the smallest integer k such that k^2 == p (mod prime(n)).

Original entry on oeis.org

2, 5, 3, 2, 17, 2, 7, 5, 7, 23, 41, 2, 11, 5, 3, 59, 29, 71, 2, 17, 11, 3, 43, 41, 37, 7, 31, 17, 13, 7, 5, 47, 59, 47, 151, 2, 23, 17, 79, 5, 3, 59, 2, 113, 2, 29, 71, 23, 17, 83, 5, 67, 61, 131, 53, 47, 43, 41, 31, 17, 13, 11, 7, 67, 239, 53, 227, 47, 2, 107
Offset: 4

Views

Author

Michel Lagneau, May 29 2012

Keywords

Comments

The corresponding values of k are {3, 4, 4, 6, 6, 5, 6, 6, 9, 8, 16, 7, 8, 8, 8, 27, …}

Examples

			a(8) = 17 because 17 == 6^2 mod 19 where 19 = prime(8) and 6 is the smallest k.
Remark : 11 == 7^2 mod 19, but 7 > 6.
		

Crossrefs

Programs

  • Maple
    for n from 2 to 100 do:p:=ithprime(n):i:=0:for k from 0 to p-1 while(i=0) do: q:=irem(k^2,p):if type(q,prime)=true then i:=1:printf(`%d, `,q):else fi:od:od: