|
Search: id:A124882
|
|
|
| A124882 |
|
Maximum number of distinct squares in arithmetic progression modulo prime(n). |
|
+0 1
|
|
| 2, 2, 3, 3, 3, 4, 5, 4, 5, 4, 4, 4, 5, 5, 5, 6, 5, 6, 6, 7, 9, 6, 7, 6, 9, 7, 7, 6, 10, 5, 7, 8, 6, 5, 6, 7, 6, 6, 6, 6, 6, 6, 7, 9, 7, 6, 7, 7, 7, 6, 7, 7, 13, 7, 6, 7, 9, 7, 10, 7, 9, 9, 7, 11, 9, 7, 8, 9, 8, 6, 8, 8, 9, 6, 8, 8, 8, 8, 9, 13, 8, 12, 7, 9, 10, 8, 9, 9, 8, 8, 11, 13, 8, 8, 10, 8, 9, 8, 10, 10
(list; graph; listen)
|
|
|
OFFSET
|
1,1
|
|
|
COMMENT
|
For the natural numbers, it is well known that four squares cannot be in AP. Brown shows that this is not the case for modular arithmetic. There is no limit to the number of squares in AP modulo a prime: for the n-th prime pseudosquare A002223(n), the numbers 0,1,2,...,prime(n+1)-1 are squares in AP mod A002223(n).
|
|
LINKS
|
K. S. Brown, Squares in Arithmetic Progression (mod p)
|
|
EXAMPLE
|
Consider numbers modulo 13, the 6th prime. The squares mod 13 are 0,1,3,4,9,10,12. Exhaustive search finds that the four numbers 1,9,17,25 are in AP and are also distinct squares module 13. Hence a(6)=4. There are two other APs of squares having the same length: 4,10,16,22 and 10,12,14,16.
|
|
MATHEMATICA
|
t=Table[p=Prime[n]; sqs=Sort[Mod[Range[0, (p-1)/2]^2, p]]; kMx=0; Do[If[i!=j, df=sqs[[j]]-sqs[[i]]; k=2; While[MemberQ[sqs, Mod[sqs[[i]]+k*df, p]], k++ ]; k--; If[k>kMx, kMx=k]], {i, Length[sqs]}, {j, Length[sqs]}]; kMx+1, {n, 2, PrimePi[617]}]; Join[{2}, t]
|
|
CROSSREFS
|
Adjacent sequences: A124879 A124880 A124881 this_sequence A124883 A124884 A124885
Sequence in context: A025777 A029095 A134403 this_sequence A085578 A101646 A080677
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
T. D. Noe (noe(AT)sspectra.com), Nov 13 2006
|
|
|
Search completed in 0.002 seconds
|