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.

A080146 Binary encoding of quadratic residue set for each prime. a(n) = A055094(A000040(n)).

This page as a plain text file.
%I A080146 #9 Sep 20 2022 07:52:35
%S A080146 1,2,9,52,738,2829,53643,162438,4023888,166236537,921787428,
%T A080146 48034254669,935251837851,2558696229078,68055676507664,
%U A080146 2655011771373417,210067141980993186,831463105466530077,42882922858578320598
%N A080146 Binary encoding of quadratic residue set for each prime. a(n) = A055094(A000040(n)).
%F A080146 a(A080148(n)) = A080117(A080148(n)).
%p A080146 with(numtheory,ithprime); A080146 := n -> A055094(ithprime(n));
%t A080146 A055094[n_] := With[{rr = Table[Mod[k^2, n], {k, 1, n-1}] // Union}, Boole[MemberQ[rr, #]]& /@ Range[n-1]] // FromDigits[#, 2]&;
%t A080146 a[n_] := A055094[Prime[n]];
%t A080146 Table[a[n], {n, 1, 20}] (* _Jean-François Alcover_, Sep 20 2022 *)
%o A080146 (PARI) a(n) = my(p=prime(n)); sum(k=1, p-1, 2^(k-1)*(0<sum(i=1, p-1, i^2%p==p-k))); \\ _Michel Marcus_, Sep 20 2022; after A055094
%Y A080146 Cf. A000040, A055094, A080117, A080148.
%K A080146 nonn
%O A080146 1,2
%A A080146 _Antti Karttunen_, Feb 11 2003