|
|
A040051
|
|
Parity of partition function A000041.
|
|
32
|
|
|
1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
From M. V. Subbarao (m.v.subbarao(AT)ualberta.ca), Sep 05 2003: (Start)
Essentially this same question was raised by Ramanujan in a letter to P. A. MacMahon around 1920 (see page 1087, MacMahon's Collected Papers). With the help of Jacobi's triple product identity, MacMahon showed that p(1000) is odd (as he says, with five minutes work - there were no computers those days).
Now we know that among the first ten million values of p(n) 5002137 of them are odd. It is conjectured (T. R. Parkin and D. Shanks) that p(n) is equally often even and odd. Lower bound estimates for the number of times p(n) is even among the first N values of p(n) for any given N are known (Scott Ahlgren; and Nicolas, Rusza and Sárközy among others).
Earlier this year a remarkable result was proved by Boylan and Ahlgren (AMS ABSTRACT # 987-11-82) which says that beyond the three eighty-year old Ramanujan congruences - namely, p(5n+4), p(7n+5) and p(11n +6) being divisible respectively by 5,7 and 11 - there are no other simple congruences of this kind.
My 1966 conjecture that in every arithmetic progression r (mod s) for arbitrary integral r and s, there are infinitely many integers n for which p(n) is odd - with a similar statement for p(n) even - was proved for the even case by Ken Ono (1996) and for the odd case for all s up to 10^5 and for all s which are powers of 2 by Bolyan and Ono, 2002.
(End)
a(n) is also the parity of the trace Tr(n) = A183011(n), the numerator of the Bruinier-Ono formula for the partition function, if n >= 1. - Omar E. Pol, Mar 14 2012
Consider the diagram of the regions of n (see A206437). Then, in each odd-indexed region of n, fill each part of size k with k 1's. Then, in each even-indexed region of n, fill each part of size k with k 0's. The successive digits of row 1 of the diagram give the first n elements of this sequence, if n >= 1. - Omar E. Pol, May 02 2012
|
|
REFERENCES
|
H. Gupta, A note on the parity of p(n), J. Indian Math. Soc. (N.S.) 10, (1946). 32-33. MR0020588 (8,566g)
K. M. Majumdar, On the parity of the partition function p(n), J. Indian Math. Soc. (N.S.) 13, (1949). 23-24. MR0030553 (11,13d)
M. V. Subbarao, A note on the parity of p(n), Indian J. Math. 14 (1972), 147-148. MR0357355 (50 #9823)
|
|
LINKS
|
|
|
FORMULA
|
a(n) = pp(n, 1), with Boolean pp(n, k) = if k<n then pp(n-k, k) XOR pp(n, k+1) else (k=n). - Reinhard Zumkeller, Sep 04 2003
a(n) = Pm(n,1) with Pm(n,k) = if k<n then (Pm(n-k,k) + Pm(n,k+1)) mod 2 else 0^(n*(k-n)). - Reinhard Zumkeller, Jun 09 2009
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) a(n)=if(n<0, 0, numbpart(n)%2)
(PARI) a(n)=if(n<0, 0, polcoeff(1/eta(x+x*O(x^n)), n)%2)
(PARI) a(n)=if(n<10^9, return(numbpart(n)%2)); my(r=n%4, u=select(k->k^2%32==8*r+1, [1..31]), st=u[1], m=n\4, s); u=[u[2]-u[1], u[3]-u[2], u[4]-u[3], u[1]+32-u[4]]; forstep(t=[1, 3, 7, 5][r+1], sqrtint(32*m-1), u, k=t^2>>5; if(a(m-k), s++)); s%2 \\ Merca's algorithm, switching to direct computation for n less than 10^9. Very time-consuming but low memory use. - Charles R Greathouse IV, Jan 24 2018
(Haskell)
import Data.Bits (xor)
a040051 n = p 1 n :: Int where
p _ 0 = 1
p k m | k <= m = p k (m - k) `xor` p (k+1) m | k > m = 0
(Python)
from sympy import npartitions
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|