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.
%I A055088 #19 May 18 2024 19:34:36 %S A055088 1,1,0,1,0,0,1,0,0,1,1,0,1,1,0,1,1,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0, %T A055088 1,0,1,0,0,1,1,1,0,0,1,1,0,1,1,1,0,0,0,1,0,1,0,0,1,0,0,0,0,1,0,0,1,0, %U A055088 1,1,0,0,0,0,1,1,0,1,1,1,0,1,0,0,1,1,1,0,1,0,0,1,0,0,1,0,1,0,0,1,1,0,0,0,0 %N A055088 Triangle of generalized Legendre symbols L(a/b) read by rows, with 1's for quadratic residues and 0's for quadratic non-residues. %C A055088 L(a/b) is 1 if an integer c exists such that c^2 is congruent to a (mod b) and 0 otherwise. %C A055088 For every prime of the form 4k+1 (A002144) the row is symmetric and for every prime of the form 4k+3 (A002145) the row is "complementarily symmetric". %e A055088 The tenth row gives the quadratic residues and non-residues of 11 (see A011582) and the twelfth row gives the same information for 13 (A011583), with -1's replaced by zeros. %e A055088 . %e A055088 Triangle starts: %e A055088 [ 1] [1] %e A055088 [ 2] [1, 0] %e A055088 [ 3] [1, 0, 0] %e A055088 [ 4] [1, 0, 0, 1] %e A055088 [ 5] [1, 0, 1, 1, 0] %e A055088 [ 6] [1, 1, 0, 1, 0, 0] %e A055088 [ 7] [1, 0, 0, 1, 0, 0, 0] %e A055088 [ 8] [1, 0, 0, 1, 0, 0, 1, 0] %e A055088 [ 9] [1, 0, 0, 1, 1, 1, 0, 0, 1] %e A055088 [10] [1, 0, 1, 1, 1, 0, 0, 0, 1, 0] %e A055088 [11] [1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0] %e A055088 [12] [1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1] %p A055088 # See A054431 for one_or_zero and trinv. %p A055088 with(numtheory,quadres); quadres_0_1_array := (n) -> one_or_zero(quadres((n-((trinv(n-1)*(trinv(n-1)-1))/2)), (trinv(n-1)+1))); %t A055088 row[n_] := With[{rr = Table[Mod[k^2, n + 1], {k, 1, n}] // Union}, Boole[ MemberQ[rr, #]]& /@ Range[n]]; %t A055088 Array[row, 14] // Flatten (* _Jean-François Alcover_, Mar 05 2016 *) %o A055088 (Sage) %o A055088 def A055088_row(n) : %o A055088 Q = quadratic_residues(n+1) %o A055088 return [int(i in Q) for i in (1..n)] %o A055088 for n in (1..14) : print(A055088_row(n)) # _Peter Luschny_, Aug 08 2012 %Y A055088 Cf. A002144, A002145, A011582, A011583. %Y A055088 Each row interpreted as a binary number: A055094. %K A055088 nonn,tabl %O A055088 1,1 %A A055088 _Antti Karttunen_, Apr 18 2000