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 A080117 #18 Sep 20 2022 07:54:30 %S A080117 2,10,52,738,2866,53620,162438,4023888,166243974,921787428, %T A080117 48034443442,935251508324,2558696229078,68055676507664, %U A080117 2655011787909270,210067141980993186,831463106366605026,42882922858578320598 %N A080117 Binary encoding of quadratic residue set formed for n-th prime, coerced to "complementarily symmetric binary sequence" with A080261 if the prime is of the form 4k+1. %F A080117 a(A080148(n)) = A080146(A080148(n)) %p A080117 with(numtheory,ithprime); A080117 := proc(n) local c,p; p := ithprime(n); c := A055094(p); if(3 = (p mod 4)) then RETURN(c); else RETURN(A080261(c)); fi; end; %t A080117 A055094[n_] := With[{rr = Table[Mod[k^2, n], {k, 1, n-1}] // Union}, Boole[ MemberQ[rr, #]] & /@ Range[n-1]] // FromDigits[#, 2]&; %t A080117 A080261[n_] := Module[{bb = IntegerDigits[n, 2]}, lg = Length[bb]; Do[ bb[[i]] = 1 - bb[[i]], {i, lg, lg - Floor[lg/2] + 1, -1}]; FromDigits[ bb, 2]]; %t A080117 a[n_] := Module[{c, p = Prime[n]}, c = A055094[p]; If[Mod[p, 4] == 3, c, A080261[c]]]; Table[a[n], {n, 2, 20}] (* _Jean-François Alcover_, Mar 05 2016, adapted from Maple *) %o A080117 (Sage) # uses[A080261] %o A080117 def A080117(n) : %o A080117 p = nth_prime(n) %o A080117 c = A055094(p) %o A080117 return c if 3 == p%4 else A080261(c) %o A080117 [A080117(n) for n in (2..19)] # _Peter Luschny_, Aug 09 2012 %Y A080117 Cf. A080118, A080146, A080148. %K A080117 nonn %O A080117 2,1 %A A080117 _Antti Karttunen_, Feb 11 2003