[go: nahoru, domu]

login
Revision History for A151763 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
If n is a prime == 1 mod 4 then a(n) = 1, if n is a prime == 3 mod 4 then a(n) = -1, otherwise a(n) = 0.
(history; published version)
#24 by N. J. A. Sloane at Sat Dec 03 12:12:17 EST 2016
STATUS

reviewed

approved

#23 by Michel Marcus at Sat Dec 03 03:43:31 EST 2016
STATUS

proposed

reviewed

#22 by Jean-François Alcover at Sat Dec 03 03:34:58 EST 2016
STATUS

editing

proposed

#21 by Jean-François Alcover at Sat Dec 03 03:34:52 EST 2016
MATHEMATICA

a[n_] := Which[!PrimeQ[n], 0, m = Mod[n, 4]; m == 1, 1, m == 3, -1, True, 0]; Array[a, 105] (* Jean-François Alcover, Dec 03 2016 *)

STATUS

approved

editing

#20 by Wesley Ivan Hurt at Sat Aug 23 00:36:12 EDT 2014
STATUS

reviewed

approved

#19 by Robert Israel at Fri Aug 22 12:33:31 EDT 2014
STATUS

proposed

reviewed

#18 by Robert Israel at Fri Aug 22 12:33:23 EDT 2014
STATUS

editing

proposed

#17 by Robert Israel at Fri Aug 22 12:33:11 EDT 2014
MAPLE

a:= proc(n) if n::odd and isprime(n) then 2 - (n mod 4) else 0 fi end proc:

seq(a(n), n=1..100); # Robert Israel, Aug 22 2014

STATUS

reviewed

editing

#16 by Tom Edgar at Fri Aug 22 12:25:07 EDT 2014
STATUS

proposed

reviewed

#15 by Michel Marcus at Fri Aug 22 09:02:21 EDT 2014
STATUS

editing

proposed