OFFSET
2,2
LINKS
David A. Corneth, Table of n, a(n) for n = 2..10000
EXAMPLE
Since 9! = 2^7*3^4*5*7, then we have a binary number the digits of which are the exponents modulo 2: 1011. In decimal this is 11. So a(9)=11.
PROG
(PARI) a(n) = subst(Pol(factor(n!)[, 2] % 2), x, 2); \\ Michel Marcus, Feb 15 2016
(PARI) a(n) = { my(res = 0); forprime(p = 2, n, res = 2*res + (val(n, p)%2) ); res }
val(n, p) = my(r=0); while(n, r+=n\=p); r \\ David A. Corneth, Feb 24 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev, Apr 06 2014
EXTENSIONS
More terms from Michel Marcus, Feb 15 2016
STATUS
approved