login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Search: a151763 -id:a151763
Displaying 1-9 of 9 results found. page 1
     Sort: relevance | references | number | modified | created      Format: long | short | data
A010051 Characteristic function of primes: 1 if n is prime, else 0. +10
1174
0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The following sequences all have the same parity (with an extra zero term at the start of a(n)): a(n), A061007, A035026, A069754, A071574. - Jeremy Gardiner, Aug 09 2002
Hardy and Wright prove that the real number 0.011010100010... is irrational. See Nasehpour link. - Michel Marcus, Jun 21 2018
The spectral components (excluding the zero frequency) of the Fourier transform of the partial sequences {a(j)} with j=1..n and n an even number, exhibit a remarkable symmetry with respect to the central frequency component at position 1 + n/4. See the Fourier spectrum of the first 2^20 terms in Links, Comments in A289777, and Conjectures in A001223 of Sep 01 2019. It also appears that the symmetry grows with n. - Andres Cicuttin, Aug 23 2020
REFERENCES
J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 3.
V. Brun, Über das Goldbachsche Gesetz und die Anzahl der Primzahlpaare, Arch. Mat. Natur. B, 34, no. 8, 1915.
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Oxford University Press, London, 1975.
Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 65.
LINKS
Daniel Forgues, Table of n, a(n) for n = 1..100000 (first 10000 terms from N. J. A. Sloane)
Y. Motohashi, An overview of the Sieve Method and its History, arXiv:math/0505521 [math.NT], 2005-2006.
Peyman Nasehpour, A Simple Criterion for Irrationality of Some Real Numbers, Journal of Algorithms and Computation, Vol. 52, No. 1 (2020), pp. 97-104, preprint, arXiv:1806.07560 [math.AC], 2018.
J. L. Ramírez and G. N. Rubiano, Properties and Generalizations of the Fibonacci Word Fractal, The Mathematica Journal, Vol. 16 (2014).
Eric Weisstein's World of Mathematics, Prime Number.
Eric Weisstein's World of Mathematics, Prime Constant.
Eric Weisstein's World of Mathematics, Prime zeta function primezeta(s).
FORMULA
a(n) = floor(cos(Pi*((n-1)! + 1)/n)^2) for n >= 2. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 07 2002
Let M(n) be the n X n matrix m(i, j) = 0 if n divides ij + 1, m(i, j) = 1 otherwise; then for n > 0 a(n) = -det(M(n)). - Benoit Cloitre, Jan 17 2003
n >= 2, a(n) = floor(phi(n)/(n - 1)) = floor(A000010(n)/(n - 1)). - Benoit Cloitre, Apr 11 2003
a(n) = Sum_{d|gcd(n, A034386(n))} mu(d). [Brun]
a(m*n) = a(m)*0^(n - 1) + a(n)*0^(m - 1). - Reinhard Zumkeller, Nov 25 2004
a(n) = 1 if n has no divisors other than 1 and n, and 0 otherwise. - Jon Perry, Jul 02 2005
Dirichlet generating function: Sum_{n >= 1} a(n)/n^s = primezeta(s), where primezeta is the prime zeta function. - Franklin T. Adams-Watters, Sep 11 2005
a(n) = (n-1)!^2 mod n. - Franz Vrabec, Jun 24 2006
a(n) = A047886(n, 1). - Reinhard Zumkeller, Apr 15 2008
Equals A051731 (the inverse Möbius transform) * A143519. - Gary W. Adamson, Aug 22 2008
a(n) = A051731((n + 1)! + 1, n) from Wilson's theorem: n is prime if and only if (n + 1)! is congruent to -1 mod n. - N-E. Fahssi, Jan 20 2009, Jan 29 2009
a(n) = A166260/A001477. - Mats Granvik, Oct 10 2009
a(n) = 0^A070824, where 0^0=1. - Mats Granvik, Gary W. Adamson, Feb 21 2010
It appears that a(n) = (H(n)*H(n + 1)) mod n, where H(n) = n!*Sum_{k=1..n} 1/k = A000254(n). - Gary Detlefs, Sep 12 2010
Dirichlet generating function: log( Sum_{n >= 1} 1/(A112624(n)*n^s) ). - Mats Granvik, Apr 13 2011
a(n) = A100995(n) - sqrt(A100995(n)*A193056(n)). - Mats Granvik, Jul 15 2011
a(n) * (2 - n mod 4) = A151763(n). - Reinhard Zumkeller, Oct 06 2011
(n - 1)*a(n) = ( (2*n + 1)!! * Sum_{k=1..n}(1/(2*k + 1))) mod n, n > 2. - Gary Detlefs, Oct 07 2011
For n > 1, a(n) = floor(1/A001222(n)). - Enrique Pérez Herrero, Feb 23 2012
a(n) = mu(n) * Sum_{d|n} mu(d)*omega(d), where mu is A008683 and omega A001222 or A001221 indistinctly. - Enrique Pérez Herrero, Jun 06 2012
a(n) = A003418(n+1)/A003418(n) - A217863(n+1)/A217863(n) = A014963(n) - A072211(n). - Eric Desbiaux, Nov 25 2012
For n > 1, a(n) = floor(A014963(n)/n). - Eric Desbiaux, Jan 08 2013
a(n) = ((abs(n-2))! mod n) mod 2. - Timothy Hopper, May 25 2015
a(n) = abs(F(n)) - abs(F(n)-1/2) - abs(F(n)-1) + abs(f(n)-3/2), where F(n) = Sum_{m=2..n+1} (abs(1 - (n mod m)) - abs(1/2 - (n mod m)) + 1/2), n > 0. F(n) = 1 if n is prime, > 1 otherwise, except F(1) = 0. a(n) = 1 if F(n) = 1, 0 otherwise. - Timothy Hopper, Jun 16 2015
For n > 4, a(n) = (n-2)! mod n. - Thomas Ordowski, Jul 24 2016
From Ilya Gutkovskiy, Jul 24 2016: (Start)
G.f.: A(x) = Sum_{n>=1} x^A000040(n) = B(x)*(1 - x), where B(x) is the g.f. for A000720.
a(n) = floor(2/A000005(n)), for n>1. (End)
a(n) = pi(n) - pi(n-1) = A000720(n) - A000720(n-1), for n>=1. - G. C. Greubel, Jan 05 2017
Decimal expansion of Sum_{k>=1} (1/10)^prime(k) = 9 * Sum_{k>=1} pi(k)/10^(k+1), where pi(k) = A000720(k). - Amiram Eldar, Aug 11 2020
a(n) = 1 - ceiling((2/n) * Sum_{k=2..floor(sqrt(n))} floor(n/k)-floor((n-1)/k)), n>1. - Gary Detlefs, Sep 08 2023
MAPLE
A010051:= n -> if isprime(n) then 1 else 0 fi;
MATHEMATICA
Table[ If[ PrimeQ[n], 1, 0], {n, 105}] (* Robert G. Wilson v, Jan 15 2005 *)
Table[Boole[PrimeQ[n]], {n, 105}] (* Alonso del Arte, Aug 09 2011 *)
Table[PrimePi[n] - PrimePi[n-1], {n, 50}] (* G. C. Greubel, Jan 05 2017 *)
PROG
(Magma) s:=[]; for n in [1..100] do if IsPrime(n) then s:=Append(s, 1); else s:=Append(s, 0); end if; end for; s;
(Magma) [IsPrime(n) select 1 else 0: n in [1..100]]; // Bruno Berselli, Mar 02 2011
(PARI) { for (n=1, 20000, if (isprime(n), a=1, a=0); write("b010051.txt", n, " ", a); ) } \\ Harry J. Smith, Jun 15 2009
(PARI) a(n)=isprime(n) \\ Charles R Greathouse IV, Apr 16, 2011
(Haskell)
import Data.List (unfoldr)
a010051 :: Integer -> Int
a010051 n = a010051_list !! (fromInteger n-1)
a010051_list = unfoldr ch (1, a000040_list) where
ch (i, ps'@(p:ps)) = Just (fromEnum (i == p),
(i + 1, if i == p then ps else ps'))
-- Reinhard Zumkeller, Apr 17 2012, Sep 15 2011
(Python)
from sympy import isprime
def A010051(n): return int(isprime(n)) # Chai Wah Wu, Jan 20 2022
CROSSREFS
Cf. A051006 (constant 0.4146825... (base 10) = 0.01101010001010001010... (base 2)), A001221 (inverse Moebius transform), A143519, A156660, A156659, A156657, A059500, A053176, A059456, A072762.
First differences of A000720, so A000720 gives partial sums.
Column k=1 of A117278.
Characteristic function of A000040.
KEYWORD
nonn,easy
AUTHOR
STATUS
approved
A002144 Pythagorean primes: primes of the form 4*k + 1.
(Formerly M3823 N1566)
+10
482
5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 137, 149, 157, 173, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 313, 317, 337, 349, 353, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461, 509, 521, 541, 557, 569, 577, 593, 601, 613, 617 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Rational primes that decompose in the field Q(sqrt(-1)). - N. J. A. Sloane, Dec 25 2017
These are the prime terms of A009003.
-1 is a quadratic residue mod a prime p if and only if p is in this sequence.
Sin(a(n)*Pi/2) = 1 with Pi = 3.1415..., see A070750. - Reinhard Zumkeller, May 04 2002
If at least one of the odd primes p, q belongs to the sequence, then either both or neither of the congruences x^2 = p (mod q), x^2 = q (mod p) are solvable, according to Gauss reciprocity law. - Lekraj Beedassy, Jul 17 2003
Odd primes such that binomial(p-1, (p-1)/2) == 1 (mod p). - Benoit Cloitre, Feb 07 2004
Primes that are the hypotenuse of a right triangle with integer sides. The Pythagorean triple is {A002365(n), A002366(n), a(n)}.
Also, primes of the form a^k + b^k, k > 1. - Amarnath Murthy, Nov 17 2003
The square of a(n) is the average of two other squares. This fact gives rise to a class of monic polynomials x^2 + bx + c with b = a(n) that will factor over the integers regardless of the sign of c. See A114200. - Owen Mertens (owenmertens(AT)missouristate.edu), Nov 16 2005
Also such primes p that the last digit is always 1 for the Nexus numbers of form n^p - (n-1)^p. - Alexander Adamchuk, Aug 10 2006
The set of Pythagorean primes is a proper subset of the set of positive fundamental discriminants (A003658). - Paul Muljadi, Mar 28 2008
A079260(a(n)) = 1; complement of A137409. - Reinhard Zumkeller, Oct 11 2008
From Artur Jasinski, Dec 10 2008: (Start)
If we take 4 numbers: 1, A002314(n), A152676(n), A152680(n) then multiplication table modulo a(n) is isomorphic to the Latin square:
1 2 3 4
2 4 1 3
3 1 4 2
4 3 2 1
and isomorphic to the multiplication table of {1, i, -i, -1} where i is sqrt(-1), A152680(n) is isomorphic to -1, A002314(n) with i or -i and A152676(n) vice versa -i or i. 1, A002314(n), A152676(n), A152680(n) are subfield of Galois field [a(n)]. (End)
Primes p such that the arithmetic mean of divisors of p^3 is an integer. There are 2 sequences of such primes: this one and A002145. - Ctibor O. Zizka, Oct 20 2009
Equivalently, the primes p for which the smallest extension of F_p containing the square roots of unity (necessarily F_p) contains the 4th roots of unity. In this respect, the n = 2 case of a family of sequences: see n=3 (A129805) and n=5 (A172469). - Katherine E. Stange, Feb 03 2010
Subsequence of A007969. - Reinhard Zumkeller, Jun 18 2011
A151763(a(n)) = 1.
k^k - 1 is divisible by 4*k + 1 if 4*k + 1 is a prime (see Dickson reference). - Gary Detlefs, May 22 2013
Not only are the squares of these primes the sum of two nonzero squares, but the primes themselves are also. 2 is the only prime equal to the sum of two nonzero squares and whose square is not. 2 is therefore not a Pythagorean prime. - Jean-Christophe Hervé, Nov 10 2013
The statement that these primes are the sum of two nonzero squares follows from Fermat's theorem on the sum of two squares. - Jerzy R Borysowicz, Jan 02 2019
The decompositions of the prime and its square into two nonzero squares are unique. - Jean-Christophe Hervé, Nov 11 2013. See the Dickson reference, Vol. II, (B) on p. 227. - Wolfdieter Lang, Jan 13 2015
p^e for p prime of the form 4*k+1 and e >= 1 is the sum of 2 nonzero squares. - Jon Perry, Nov 23 2014
Primes p such that the area of the isosceles triangle of sides (p, p, q) for some integer q is an integer. - Michel Lagneau, Dec 31 2014
This is the set of all primes that are the average of two squares. - Richard R. Forberg, Mar 01 2015
Numbers k such that ((k-3)!!)^2 == -1 (mod k). - Thomas Ordowski, Jul 28 2016
This is a subsequence of primes of A004431 and also of A016813. - Bernard Schott, Apr 30 2022
In addition to the comment from Jean-Christophe Hervé, Nov 10 2013: All powers as well as the products of any of these primes are the sum of two nonzero squares. They are terms of A001481, which is closed under multiplication. - Klaus Purath, Nov 19 2023
REFERENCES
David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.
L. E. Dickson, "History of the Theory of Numbers", Chelsea Publishing Company, 1919, Vol I, page 386
L. E. Dickson, History of the Theory of Numbers, Carnegie Institution, Publ. No. 256, Vol. II, Washington D.C., 1920, p. 227.
M. du Sautoy, The Music of the Primes, Fourth Estate / HarperCollins, 2003; see p. 76.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Zak Seidov, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math.Series 55, Tenth Printing, 1972.
Peter R. J. Asveld, On a Post's System of Tag. Bulletin of the EATCS 36 (1988), 96-102.
C. Banderier, Calcul de (-1/p)
J. Butcher, Mathematical Miniature 8: The Quadratic Residue Theorem, NZMS Newsletter, No. 75, April 1999.
Hing Lun Chan, Windmills of the minds: an algorithm for Fermat's Two Squares Theorem, arXiv:2112.02556 [cs.LO], 2021.
A. David Christopher, A partition-theoretic proof of Fermat's Two Squares Theorem, Discrete Mathematics, Volume 339, Issue 4, 6 April 2016, Pages 1410-1411.
J. E. Ewell, A Simple Proof of Fermat's Two-Square Theorem, The American Mathematical Monthly, Vol. 90, No. 9 (Nov., 1983), pp. 635-637.
Bernard Frénicle de Bessy, Méthode pour trouver la solution des problèmes par les exclusions. Abrégé des combinaisons. Des Quarrez magiques, in "Divers ouvrages de mathématiques et de physique, par MM. de l'Académie royale des sciences", (1693) "Troisième exemple", pp. 17-26, see in particular p. 25.
A. Granville and G. Martin, Prime number races, arXiv:math/0408319 [math.NT], 2004.
D. & C. Hazzlewood, Quadratic Reciprocity
Ernest G. Hibbs, Component Interactions of the Prime Numbers, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33.
Lucas Lacasa, Bartolome Luque, Ignacio Gómez, and Octavio Miramontes, On a Dynamical Approach to Some Prime Number Sequences, Entropy 20.2 (2018): 131, also arXiv:1802.08349 [math.NT], 2018.
Carlos Rivera, Puzzle 968. Another property of primes 4m+1, The Prime Puzzles & Problems Connection.
D. Shanks, Review of "K. E. Kloss et al., Class number of primes of the form 4n+1", Math. Comp., 23 (1969), 213-214. [Annotated scanned preprint of review]
S. A. Shirali, A family portrait of primes-a case study in discrimination, Math. Mag. Vol. 70, No. 4 (Oct., 1997), pp. 263-272.
Rosemary Sullivan and Neil Watling, Independent divisibility pairs on the set of integers from 1 to n, INTEGERS 13 (2013) #A65.
Eric Weisstein's World of Mathematics, Wilson's Theorem
Eric Weisstein's World of Mathematics, Pythagorean Triples
Wolfram Research, The Gauss Reciprocity Law
G. Xiao, Two squares
D. Zagier, A One-Sentence Proof That Every Prime p == 1 (mod 4) Is a Sum of Two Squares, Am. Math. Monthly, Vol. 97, No. 2 (Feb 1990), p. 144. [From Wolfdieter Lang, Jan 17 2015 (thanks to Charles Nash)]
FORMULA
Odd primes of form x^2 + y^2, (x=A002331, y=A002330, with x < y) or of form u^2 + 4*v^2, (u = A002972, v = A002973, with u odd). - Lekraj Beedassy, Jul 16 2004
p^2 - 1 = 12*Sum_{i = 0..floor(p/4)} floor(sqrt(i*p)) where p = a(n) = 4*n + 1. [Shirali]
a(n) = A000290(A002972(n)) + A000290(2*A002973(n)) = A000290(A002331(n+1)) + A000290(A002330(n+1)). - Reinhard Zumkeller, Feb 16 2010
a(n) = A002972(n)^2 + (2*A002973(n))^2, n >= 1. See the Jean-Christophe Hervé Nov 11 2013 comment. - Wolfdieter Lang, Jan 13 2015
a(n) = 4*A005098(n) + 1. - Zak Seidov, Sep 16 2018
From Vaclav Kotesovec, Apr 30 2020: (Start)
Product_{k>=1} (1 - 1/a(k)^2) = A088539.
Product_{k>=1} (1 + 1/a(k)^2) = A243380.
Product_{k>=1} (1 - 1/a(k)^3) = A334425.
Product_{k>=1} (1 + 1/a(k)^3) = A334424.
Product_{k>=1} (1 - 1/a(k)^4) = A334446.
Product_{k>=1} (1 + 1/a(k)^4) = A334445.
Product_{k>=1} (1 - 1/a(k)^5) = A334450.
Product_{k>=1} (1 + 1/a(k)^5) = A334449. (End)
From Vaclav Kotesovec, May 05 2020: (Start)
Product_{k>=1} (1 + 1/A002145(k)) / (1 + 1/a(k)) = Pi/(4*A064533^2) = 1.3447728438248695625516649942427635670667319092323632111110962...
Product_{k>=1} (1 - 1/A002145(k)) / (1 - 1/a(k)) = Pi/(8*A064533^2) = 0.6723864219124347812758324971213817835333659546161816055555481... (End)
Sum_{k >= 1} 1/a(k)^s = (1/2) * Sum_{n >= 1 odd numbers} moebius(n) * log((2*n*s)! * zeta(n*s) * abs(EulerE(n*s - 1)) / (Pi^(n*s) * 2^(2*n*s) * BernoulliB(2*n*s) * (2^(n*s) + 1) * (n*s - 1)!))/n, s >= 3 odd number. - Dimitris Valianatos, May 21 2020
Legendre symbol (-1, a(n)) = +1, for n >= 1. - Wolfdieter Lang, Mar 03 2021
EXAMPLE
The following table shows the relationship between several closely related sequences:
Here p = A002144 = primes == 1 (mod 4), p = a^2+b^2 with a < b;
a = A002331, b = A002330, t_1 = ab/2 = A070151;
p^2 = c^2 + d^2 with c < d; c = A002366, d = A002365,
t_2 = 2ab = A145046, t_3 = b^2 - a^2 = A070079,
with {c,d} = {t_2, t_3}, t_4 = cd/2 = ab(b^2-a^2).
---------------------------------
p a b t_1 c d t_2 t_3 t_4
---------------------------------
5 1 2 1 3 4 4 3 6
13 2 3 3 5 12 12 5 30
17 1 4 2 8 15 8 15 60
29 2 5 5 20 21 20 21 210
37 1 6 3 12 35 12 35 210
41 4 5 10 9 40 40 9 180
53 2 7 7 28 45 28 45 630
...
a(7) = 53 = A002972(7)^2 + (2*A002973(7))^2 = 7^2 + (2*1)^2 = 49 + 4, and this is the only way. - Wolfdieter Lang, Jan 13 2015
MAPLE
a := []; for n from 1 to 500 do if isprime(4*n+1) then a := [op(a), 4*n+1]; fi; od: A002144 := n->a[n];
# alternative
A002144 := proc(n)
option remember ;
local a;
if n = 1 then
5;
else
for a from procname(n-1)+4 by 4 do
if isprime(a) then
return a;
end if;
end do:
end if;
end proc:
seq(A002144(n), n=1..100) ; # R. J. Mathar, Jan 31 2024
MATHEMATICA
Select[4*Range[140] + 1, PrimeQ[ # ] &] (* Stefan Steinerberger, Apr 16 2006 *)
Select[Prime[Range[150]], Mod[#, 4]==1&] (* Harvey P. Dale, Jan 28 2021 *)
PROG
(Haskell)
a002144 n = a002144_list !! (n-1)
a002144_list = filter ((== 1) . a010051) [1, 5..]
-- Reinhard Zumkeller, Mar 06 2012, Feb 22 2011
(Magma) [a: n in [0..200] | IsPrime(a) where a is 4*n + 1 ]; // Vincenzo Librandi, Nov 23 2014
(PARI) select(p->p%4==1, primes(1000))
(PARI)
A002144_next(p=A2144[#A2144])={until(isprime(p+=4), ); p} /* NB: p must be of the form 4k+1. Beyond primelimit, this is *much* faster than forprime(p=..., , p%4==1 && return(p)). */
A2144=List(5); A002144(n)={while(#A2144<n, listput(A2144, A002144_next())); A2144[n]}
\\ M. F. Hasler, Jul 06 2024
(Python)
from sympy import prime
A002144 = [n for n in (prime(x) for x in range(1, 10**3)) if not (n-1) % 4]
# Chai Wah Wu, Sep 01 2014
(Python)
from sympy import isprime
print(list(filter(isprime, range(1, 618, 4)))) # Michael S. Branicky, May 13 2021
(SageMath)
def A002144_list(n): # returns all Pythagorean primes <= n
return [x for x in prime_range(5, n+1) if x % 4 == 1]
A002144_list(617) # Peter Luschny, Sep 12 2012
CROSSREFS
Cf. A004613 (multiplicative closure).
Apart from initial term, same as A002313.
For values of n see A005098.
Primes in A020668.
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved
A002145 Primes of the form 4*k + 3.
(Formerly M2624 N1039)
+10
339
3, 7, 11, 19, 23, 31, 43, 47, 59, 67, 71, 79, 83, 103, 107, 127, 131, 139, 151, 163, 167, 179, 191, 199, 211, 223, 227, 239, 251, 263, 271, 283, 307, 311, 331, 347, 359, 367, 379, 383, 419, 431, 439, 443, 463, 467, 479, 487, 491, 499, 503, 523, 547, 563, 571 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Or, odd primes p such that -1 is not a square mod p, i.e., the Legendre symbol (-1/p) = -1. [LeVeque I, p. 66]. - N. J. A. Sloane, Jun 28 2008
Primes which are not the sum of two squares, see the comment in A022544. - Artur Jasinski, Nov 15 2006
Natural primes which are also Gaussian primes. (It is a common error to refer to this sequence as "the Gaussian primes".)
Inert rational primes in the field Q(sqrt(-1)). - N. J. A. Sloane, Dec 25 2017
Numbers n such that the product of coefficients of (2n)-th cyclotomic polynomial equals -1. - Benoit Cloitre, Oct 22 2002
For p and q both belonging to the sequence, exactly one of the congruences x^2 = p (mod q), x^2 = q (mod p) is solvable, according to Gauss reciprocity law. - Lekraj Beedassy, Jul 17 2003
Also primes p that divide L((p-1)/2) or L((p+1)/2), where L(n) = A000032(n), the Lucas numbers. Union of A122869 and A122870. - Alexander Adamchuk, Sep 16 2006
Also odd primes p that divide ((p-1)!! + 1) or ((p-2)!! + 1). - Alexander Adamchuk, Nov 30 2006
Also odd primes p that divide ((p-1)!! - 1) or ((p-2)!! - 1). - Alexander Adamchuk, Apr 18 2007
This sequence is a proper subset of the set of the absolute values of negative fundamental discriminants (A003657). - Paul Muljadi, Mar 29 2008
Bernard Frénicle de Bessy discovered that such primes cannot be the hypotenuse of a Pythagorean triangle in opposition to primes of the form 4*n+1 (see A002144). - after Paul Curtz, Sep 10 2008
A079261(a(n)) = 1; complement of A145395. - Reinhard Zumkeller, Oct 12 2008
Subsequence of A007970. - Reinhard Zumkeller, Jun 18 2011
A151763(a(n)) = -1.
Primes p such that p XOR 2 = p - 2. Brad Clardy, Oct 25 2011 (Misleading in the sense that this is a formula for the super-sequence A004767. - R. J. Mathar, Jul 28 2014)
It appears that each term of A004767 is the mean of two terms of this subsequence of primes therein; cf. A245203. - M. F. Hasler, Jul 13 2014
Numbers n > 2 such that ((n-2)!!)^2 == 1 (mod n). - Thomas Ordowski, Jul 24 2016
Odd numbers n > 1 such that ((n-1)!!)^2 == 1 (mod n). - Thomas Ordowski, Jul 25 2016
Primes p such that (p-2)!! == (p-3)!! (mod p). - Thomas Ordowski, Jul 28 2016
See Granville and Martin for a discussion of the relative numbers of primes of the form 4k+1 and 4k+3. - Editors, May 01 2017
Sometimes referred to as Blum primes for their connection to A016105 and the Blum Blum Shub generator. - Charles R Greathouse IV, Jun 14 2018
Conjecture: a(n) for n > 4 can be written as a sum of 3 primes of the form 4k+1, which would imply that primes of the form 4k+3 >= 23 can be decomposed into a sum of 6 nonzero squares. - Thomas Scheuerle, Feb 09 2023
REFERENCES
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, p. 219, th. 252.
W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, p. 66.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Zak Seidov, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
D. Alpern, Gaussian primes
Lenore Blum, Manuel Blum, and Mike Shub, A simple unpredictable pseudo-random number generator, SIAM Journal on Computing 15:2 (1 May 1986), pp. 364-383.
A. Granville and G. Martin, Prime number races, arXiv:math/0408319 [math.NT], 2004.
Ernest G. Hibbs, Component Interactions of the Prime Numbers, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33.
Lucas Lacasa, Bartolome Luque, Ignacio Gómez, and Octavio Miramontes, On a Dynamical Approach to Some Prime Number Sequences, Entropy 20.2 (2018): 131, also arXiv:1802.08349 [math.NT], 2018.
E. T. Ordman, Tables of the class number for negative prime discriminants, Deposited in Unpublished Mathematical Table file of Math. Comp. [Annotated scanned partial copy with notes]
H. J. Smith, Gaussian Primes
Eric Weisstein's World of Mathematics, Gaussian Prime
Eric Weisstein's World of Mathematics, Gaussian Integer.
Wolfram Research, The Gauss Reciprocity Law
FORMULA
Remove from A000040 terms that are in A002313.
Intersection of A000040 and A004767. - Alonso del Arte, Apr 22 2014
From Vaclav Kotesovec, Apr 30 2020: (Start)
Product_{k>=1} (1 - 1/a(k)^2) = A243379.
Product_{k>=1} (1 + 1/a(k)^2) = A243381.
Product_{k>=1} (1 - 1/a(k)^3) = A334427.
Product_{k>=1} (1 + 1/a(k)^3) = A334426.
Product_{k>=1} (1 - 1/a(k)^4) = A334448.
Product_{k>=1} (1 + 1/a(k)^4) = A334447.
Product_{k>=1} (1 - 1/a(k)^5) = A334452.
Product_{k>=1} (1 + 1/a(k)^5) = A334451. (End)
From Vaclav Kotesovec, May 05 2020: (Start)
Product_{k>=1} (1 + 1/a(k)) / (1 + 1/A002144(k)) = Pi/(4*A064533^2) = 1.3447728438248695625516649942427635670667319092323632111110962...
Product_{k>=1} (1 - 1/a(k)) / (1 - 1/A002144(k)) = Pi/(8*A064533^2) = 0.6723864219124347812758324971213817835333659546161816055555481... (End)
Sum_{k >= 1} 1/a(k)^s = (1/2) * Sum_{n >= 1 odd numbers} moebius(n) * log(2 * (2^(n*s) - 1) * (n*s - 1)! * zeta(n*s) / (Pi^(n*s) * abs(EulerE(n*s - 1))))/n, s >= 3 odd number. - Dimitris Valianatos, May 20 2020
MAPLE
A002145 := proc(n)
option remember;
if n = 1 then
3;
else
a := nextprime(procname(n-1)) ;
while a mod 4 <> 3 do
a := nextprime(a) ;
end do;
return a;
end if;
end proc:
seq(A002145(n), n=1..20) ; # R. J. Mathar, Dec 08 2011
MATHEMATICA
Select[4Range[150] - 1, PrimeQ] (* Alonso del Arte, Dec 19 2013 *)
Select[ Prime@ Range[2, 110], Length@ PowersRepresentations[#^2, 2, 2] == 1 &] (* or *)
Select[ Prime@ Range[2, 110], JacobiSymbol[-1, #] == -1 &] (* Robert G. Wilson v, May 11 2014 *)
PROG
(PARI) forprime(p=2, 1e3, if(p%4==3, print1(p", "))) \\ Charles R Greathouse IV, Jun 10 2011
(Haskell)
a002145 n = a002145_list !! (n-1)
a002145_list = filter ((== 1) . a010051) [3, 7 ..]
-- Reinhard Zumkeller, Aug 02 2015, Sep 23 2011
(Magma) [4*n+3 : n in [0..142] | IsPrime(4*n+3)]; // Arkadiusz Wesolowski, Nov 15 2013
(Sage)
def A002145_list(n): return [p for p in prime_range(1, n + 1) if p % 4 == 3] # Peter Luschny, Jul 29 2014
CROSSREFS
Apart from initial term, same as A045326.
Cf. A016105.
Cf. A004614 (multiplicative closure).
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from James A. Sellers, Apr 21 2000
STATUS
approved
A065091 Odd primes. +10
336
3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Rayes et al. prove that the a(n)-th Chebyshev-T polynomial, divided by x, is irreducible over the integers.
Odd primes can be written as a sum of no more than two consecutive positive integers. Powers of 2 do not have a representation as a sum of k consecutive positive integers (other than the trivial n=n, for k=1). See A111774. - Jaap Spies, Jan 04 2007
Intersection of A005408 and A000040. - Reinhard Zumkeller, Oct 14 2008
Primes which are the sum of two consecutive numbers. - Juri-Stepan Gerasimov, Nov 07 2009
The arithmetic mean of divisors of p^3, (1+p)(1+p^2)/4, for odd primes p is an integer. - Ctibor O. Zizka, Oct 20 2009
Primes == -+ 1 (mod 4). - Juri-Stepan Gerasimov, Apr 27 2010
a(n) = A053670(A179675(n)) and a(n) <> A053670(m) for m < A179675(n). - Reinhard Zumkeller, Jul 23 2010
Triads of the form <2*a(n+1), a(n+1), 3*a(n+1)> like <6,3,9>, <10,5,15>, <14,7,21> appear in the EKG sequence A064413, see Theorem (3) there. - Paul Curtz, Feb 13 2011.
Complement of A065090; abs(A151763(a(n))) = 1. - Reinhard Zumkeller, Oct 06 2011
Right edge of the triangle in A065305. - Reinhard Zumkeller, Jan 30 2012
Numbers with two odd divisors. - Omar E. Pol, Mar 24 2012
Odd prime p divides some (2^k + 1) or (2^k - 1), (k>0, minimal, cf. A003558) depending on the parity of A179480((p+1)/2) = r. This is a consequence of the Quasi-order theorem and corollaries, [Hilton and Pederson, pp. 260-264]: 2^k == (-1)^r mod b, b odd; and b divides 2^k - (-1)^r, where p is a subset of b. - Gary W. Adamson, Aug 26 2012
Subset of the arithmetic numbers (A003601). - Wesley Ivan Hurt, Sep 27 2013
Odd primes p satisfy the identity: p = (product(2*cos((2*k+1)*Pi/(2*p)), k=0..(p-3)/2))^2. This follows from C(2*p, 0) = (-1)^((p-1)/2)*p, n>=2, with the minimal polynomial C(k,x) of rho(k) := 2*cos(Pi/k). See A187360 for C and the W. Lang link on the field Q(rho(n)), eqs. (20) and (37). - Wolfdieter Lang, Oct 23 2013
Numbers m > 1 such that m^2 divides (2m-1)!! + m. - Thomas Ordowski, Nov 28 2014
Numbers m such that m divides 2*(m-3)! + 1. - Thomas Ordowski, Jun 20 2015
Numbers m such that (2m-3)!! == m (mod m^2). - Thomas Ordowski, Jul 24 2016
Odd numbers m such that ((m-3)!!)^2 == +-1 (mod m). - Thomas Ordowski, Jul 27 2016
Primes of the form x^2 - y^2. - Thomas Ordowski, Feb 27 2017
Conjecture: a(n) is the smallest odd number m > prime(n) such that Sum_{k=1..prime(n)-1} k^(m-1) == prime(n)-1 (mod m). This is an extension of the Agoh-Giuga conjecture. - Thomas Ordowski, Aug 01 2018
Numbers k > 1 such that either Phi(k,x) == 1 (mod k) or Phi(k,x) == k (mod k^2) holds, where Phi(k,x) is the k-th cyclotomic polynomial. - Jianing Song, Aug 02 2018
REFERENCES
Paulo Ribenboim, The little book of big primes, Springer 1991, p. 106.
LINKS
Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harry J. Smith)
M. O. Rayes, V. Trevisan and P. S. Wang, Factorization of Chebyshev Polynomials, ICM Report, 1998.
M. O. Rayes, V. Trevisan and P. S. Wang, Factorization of Chebyshev Polynomials, Computers & Mathematics with Applications, Volume 50, Issues 8-9, October-November 2005, Pages 1231-1240.
Eric Weisstein's World of Mathematics, Prime Number.
FORMULA
a(n) = A000040(n+1). - M. F. Hasler, Oct 26 2013
MAPLE
A065091 := proc(n) RETURN(ithprime(n+1)) end:
MATHEMATICA
Prime[Range[2, 33]] (* Vladimir Joseph Stephan Orlovsky, Aug 22 2008 *)
PROG
(Haskell)
a065091 n = a065091_list !! (n-1)
a065091_list = tail a000040_list -- Reinhard Zumkeller, Jan 30 2012
(Sage)
def A065091_list(limit): # after Minác's formula
f = 3; P = [f]
for n in range(3, limit, 2):
if (f+1)>n*(f//n)+1: P.append(n)
f = f*n
return P
A065091_list(100) # Peter Luschny, Oct 17 2013
(PARI) forprime(p=3, 200, print1(p, ", ")) \\ Felix Fröhlich, Jun 30 2014
(Magma) [NthPrime(n): n in [2..100]]; // Vincenzo Librandi, Jun 21 2015
(Python)
from sympy import prime
def A065091(n): return prime(n+1) # Chai Wah Wu, Jul 13 2024
CROSSREFS
Cf. A000040, A033270, union of A002144 and A002145.
Cf. A230953 (boustrophedon transform).
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Nov 12 2001
EXTENSIONS
More terms from Francisco Salinas (franciscodesalinas(AT)hotmail.com), Jan 05 2002
Edited (moved contributions from A000040 to here) by M. F. Hasler, Oct 26 2013
STATUS
approved
A066520 Number of primes of the form 4m+3 <= n minus number of primes of the form 4m+1 <= n. +10
31
0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,11
COMMENTS
Although the initial terms are nonnegative, it has been proved that infinitely many terms are negative. The first two are a(26861)=a(26862)=-1. Next there are 3404 values of n in the range 616841 to 633798 with a(n)<0. Then 27218 values in the range 12306137 to 12382326.
Partial sums of A151763. - Reinhard Zumkeller, Feb 06 2014
LINKS
T. D. Noe, Table of n, a(n) for n=1..30000 (enough terms to show the first dip into negative territory)
Carter Bays and Richard H. Hudson, Zeros of Dirichlet L-Functions and Irregularities in the Distribution of Primes, Mathematics of Computation, 69 (2000) 861-866.
A. Granville and G. Martin, Prime number races, arXiv:math/0408319 [math.NT], 2004.
FORMULA
a(n) = A066490(n) - A066339(n).
a(2*n+1) = a(2*n+2) = -A156749(n). - Jonathan Sondow, May 17 2013
MATHEMATICA
a[n_] := Length[Select[Range[3, n, 4], PrimeQ]]-Length[Select[Range[1, n, 4], PrimeQ]]
f[n_]:=Module[{c=Mod[n, 4]}, Which[!PrimeQ[n], 0, c==3, 1, c==1, -1]]; Join[{0, 0}, Accumulate[Array[f, 110, 3]]] (* Harvey P. Dale, Mar 03 2013 *)
PROG
(Haskell)
a066520 n = a066520_list !! (n-1)
a066520_list = scanl1 (+) $ map (negate . a151763) [1..]
-- Reinhard Zumkeller, Feb 06 2014
CROSSREFS
Cf. A156749 Sequence showing Chebyshev bias in prime races (mod 4). [From Daniel Forgues, Mar 26 2009]
Let d be a fundamental discriminant.
Sequences of the form "a(n) = -Sum_{primes p<=n} Kronecker(d,p)" with |d| <= 12: A321860 (d=-11), A320857 (d=-8), A321859 (d=-7), this sequence (d=-4), A321856 (d=-3), A321857 (d=5), A071838 (d=8), A321858 (d=12).
Sequences of the form "a(n) = -Sum_{i=1..n} Kronecker(d,prime(i))" with |d| <= 12: A321865 (d=-11), A320858 (d=-8), A321864 (d=-7), A038698 (d=-4), A112632 (d=-3), A321862 (d=5), A321861 (d=8), A321863 (d=12).
KEYWORD
sign,easy,nice,look
AUTHOR
Sharon Sela (sharonsela(AT)hotmail.com), Jan 05 2002
EXTENSIONS
Edited by Dean Hickerson, Mar 05 2002
STATUS
approved
A065090 Natural numbers which are not odd primes: composites plus 1 and 2. +10
19
1, 2, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
A151763(a(n)) = 0.
PROG
(PARI) { n=0; for (m=1, 10^9, if (!isprime(m) || m==2, write("b065090.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 06 2009
(Haskell)
import Data.List (elemIndices)
a065090 n = a065090_list !! (n-1)
a065090_list = map (+ 1) $ elemIndices 0 a151763_list
-- Reinhard Zumkeller, Oct 06 2011
(Python)
from sympy import composite
def A065090(n): return composite(n-2) if n>2 else n # Chai Wah Wu, Jul 13 2024
CROSSREFS
Complement of A065091.
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Nov 12 2001
STATUS
approved
A079261 Characteristic function of primes of form 4n+3 (1 if n is prime of form 4n+3, 0 otherwise). +10
12
0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Let M(n) denote the n X n matrix m(i,j)=0 if n divides ij-1, m(i,j) = 1 otherwise then det(M(n))=+1 if and only if n is prime ==3 (mod 4).
a(A002145(n)) = 1; a(A145395(n)) = 0. [From Reinhard Zumkeller, Oct 12 2008]
a(n) * A151763(n) = - a(n).
LINKS
FORMULA
a(n) = - A010051(n) * A011764(n+1). [Reinhard Zumkeller, Oct 06 2011]
PROG
(PARI) { a(n)=isprime(n)*if(n%4-3, 0, 1) }; vector(100, n, a(n))
(Haskell)
a079261 n = fromEnum $ n `mod` 4 == 3 && a010051 n == 1
-- Reinhard Zumkeller, Oct 06 2011
CROSSREFS
Cf. A066490 (partial sums).
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Feb 04 2003
STATUS
approved
A079260 Characteristic function of primes of form 4n+1 (1 if n is prime of form 4n+1, 0 otherwise). +10
11
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Let M(n) denote the n X n matrix m(i,j)=0 if n divides ij-1, m(i,j) = 1 otherwise then det(M(n))=-1 if and only if n =2 or if n is prime ==1 (mod 4).
a(A002144(n)) = 1; a(A137409(n)) = 0. [From Reinhard Zumkeller, Oct 11 2008]
a(n) * A151763(n) = a(n).
LINKS
MATHEMATICA
Table[If[PrimeQ[n]&&IntegerQ[(n-1)/4], 1, 0], {n, 120}] (* Harvey P. Dale, Jul 14 2015 *)
PROG
(PARI) { a(n)=if(n%4==1, isprime(n)) }; vector(100, n, a(n))
(Haskell)
a079260 n = fromEnum $ n `mod` 4 == 1 && a010051 n == 1
-- Reinhard Zumkeller, Oct 06 2011
CROSSREFS
Cf. A066339 (partial sums).
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Feb 04 2003
STATUS
approved
A267133 a(n) = (1/n)(2/n)(3/n)...((n-1)/n) where (k/n) is the Kronecker symbol, n >= 1. +10
1
1, 1, -1, 0, 1, 0, -1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, -1, 0, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
A080339(n) = abs(a(n)) = a(n)^2.
a(c) = 0 if c is composite (A002808).
a(p) = 1 for primes p in A002313.
a(p) = -1 for primes p in A002145.
a(n) = A057077(n+3)*A080339(n) for n > 1. - Robert Israel, Jan 14 2016
a(n) = A151763(n), n > 2. - R. J. Mathar, Jan 17 2016
EXAMPLE
a(3) = (1/3)(2/3) = (1)(-1) = -1.
MAPLE
f:= proc(n) if not isprime(n) then 0 elif n mod 4 = 3 then -1 else 1 fi end proc:
f(1):= 1:
map(f, [$1..1000]); # Robert Israel, Jan 14 2016
MATHEMATICA
Table[Product[JacobiSymbol[k, n], {k, n - 1}], {n, 75}] (* Michael De Vlieger, Jan 12 2016 *)
PROG
(PARI) a(n) = prod(k=1, n-1, kronecker(k, n)); \\ Michel Marcus, Jan 11 2016
(PARI) a(n)=if(isprime(n), (-1)^(n%4>2), n==1) \\ Charles R Greathouse IV, Jan 14 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
EXTENSIONS
"Jacobi symbol" in Name changed to "Kronecker symbol" by Jianing Song, Dec 30 2018
STATUS
approved
page 1

Search completed in 0.014 seconds

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 26 13:45 EDT 2024. Contains 375456 sequences. (Running on oeis4.)