A268271 Primes p such that there is a Fibonacci-type sequence (mod p) that begins with (1,b) and encounters all quadratic residues of p in the first (p-1)/2 iterations (for some b).
11, 19, 29, 31, 59, 71, 79, 89, 101, 131, 179, 181, 191, 229, 239, 251, 271, 311, 349, 359, 379, 401, 419, 431, 439, 479, 491, 499, 509, 571, 599, 631, 659, 719, 739, 751, 761, 839, 941, 971, 1019, 1021, 1039, 1051, 1061, 1091, 1109, 1171, 1229, 1249, 1259, 1319, 1361, 1399
Offset: 1
Keywords
Examples
p=11 is a term since, modulo 11, the sequence 1, 4, 5, 9, 3 satisfies 5=4+1, 9=5+4, 3=9+5, 1=9+3, ..., with a period of (11-1)/2 = 5.
Links
- Alexandru Gica, Quadratic Residues in Fibonacci Sequences, Fibonacci Quart. 46/47 (2008/2009), no. 1, 68-72.
Crossrefs
Programs
-
PARI
findr(p) = {for (k=1, (p-1)/2, if ((k^2 % p) == 5, return(k)););} isok(p) = {if ((p % 2) && isprime(p), pm = p % 5; if ((pm == 1) || (pm == 4), rf = findr(p);(znorder(Mod((1+rf)/2, p)) == (p-1)/2) || (znorder(Mod((1-rf)/2, p)) == (p-1)/2);););}