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 A076342 #25 Dec 24 2022 03:46:33 %S A076342 2,4,4,8,12,12,16,20,24,28,32,36,40,44,48,52,60,60,68,72,72,80,84,88, %T A076342 96,100,104,108,108,112,128,132,136,140,148,152,156,164,168,172,180, %U A076342 180,192,192,196,200,212,224,228,228,232,240,240,252,256,264,268,272 %N A076342 a(n) = A076340(A000040(n)), real part of primes mapped as defined in A076340, A076341. %C A076342 By definition of the map defined in A076340, A076341: 2->(2,0) and p->((floor(p/4)+floor((p mod 4)/2))*4,2-(p mod 4)) for odd primes p. %C A076342 Number of solutions to x^2 + y^2 = 1 (mod p). - _Lekraj Beedassy_, Oct 22 2004 %H A076342 Robert Israel, <a href="/A076342/b076342.txt">Table of n, a(n) for n = 1..10000</a> %F A076342 a(n) = p-(-1/p) = p+(-1)^{(p+1)/2} for an odd prime p. {(a/b) stands for the value of the Legendre symbol}. - _Lekraj Beedassy_, Oct 22 2004 %F A076342 From _Amiram Eldar_, Dec 24 2022: (Start) %F A076342 a(n) = A000040(n) - A070750(n). %F A076342 a(n) = A100484(n) - A082542(n). %F A076342 Product_{n>=1} a(n)/prime(n) = 4/Pi (A088538). (End) %e A076342 A000040(11)=31=(32-1) -> (32,-1), therefore a(11)=32 and A070750(11)=-1. %p A076342 f:= proc(n) local p; %p A076342 p:= ithprime(n); %p A076342 if p mod 4 = 1 then p-1 elif p mod 4 = 3 then p+1 else 2 fi %p A076342 end proc: %p A076342 map(f, [$1..100]); # _Robert Israel_, Dec 26 2016 %t A076342 a[1] = 2; a[n_] := With[{p = Prime[n]}, p - JacobiSymbol[-1, p]]; Array[a, 60] (* _Jean-François Alcover_, Feb 01 2018, after _Lekraj Beedassy_ *) %t A076342 a[n_] := Prime[n] - 2 + Mod[Prime[n], 4]; Array[a, 100] (* _Amiram Eldar_, Dec 24 2022 *) %Y A076342 Cf. A000040, A070750, A076340, A076341, A082542, A088538. %K A076342 nonn,easy %O A076342 1,1 %A A076342 _Reinhard Zumkeller_, Oct 08 2002