OFFSET
1,1
COMMENTS
Also parity of A001227, the number of odd divisors of n. - Omar E. Pol, Apr 04 2016
Also parity of A000593, the sum of odd divisors of n. - Omar E. Pol, Apr 05 2016
Characteristic function of A028982. - Antti Karttunen, Sep 25 2017
It appears that this is also the parity of A067742, the number of middle divisors of n. - Omar E. Pol, Mar 18 2018
Also parity of the deficiency of n (A033879) and of the abundance of n (A033880). - Omar E. Pol, Nov 02 2024
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65536
J. N. Cooper and A. W. N. Riasanovsky, On the Reciprocal of the Binary Generating Function for the Sum of Divisors, 2012.
J. N. Cooper and A. W. N. Riasanovsky, On the Reciprocal of the Binary Generating Function for the Sum of Divisors, J. Int. Seq. 16 (2013) #13.1.8.
Michael Gilleland, Some Self-Similar Integer Sequences
FORMULA
a(n) = A000203(n) mod 2. a(n)=1 iff n>0 is a square or twice a square.
Multiplicative with a(2^e)=1, a(p^e)=1 if e even, 0 otherwise.
a(n) = A093709(n) if n>0.
Dirichlet g.f.: zeta(2s)(1+2^-s). - Michael Somos, Apr 12 2004
a(n) = A001157(n) mod 2. - R. J. Mathar, Apr 02 2011
a(n) = floor(sqrt(n)) + floor(sqrt(n/2)) - floor(sqrt(n-1))-floor(sqrt((n-1)/2)). - Enrique PĂ©rez Herrero, Oct 15 2013
a(n) = Sum_{ m: m^2|n } A019590(n/m^2). - Andrey Zabolotskiy, May 07 2018
G.f.: (theta_3(x) + theta_3(x^2))/2 - 1. - Ilya Gutkovskiy, May 23 2019
Sum_{k=1..n} a(k) ~ (1 + 1/sqrt(2)) * sqrt(n). - Vaclav Kotesovec, Oct 16 2020
MAPLE
A053866:= (n -> numtheory[sigma](n) mod 2):
seq (A053866(n), n=0..104); # Jani Melik, Jan 28 2011
MATHEMATICA
Mod[DivisorSigma[1, Range[110]], 2] (* Harvey P. Dale, Sep 04 2017 *)
PROG
(PARI) {a(n) = if( n<1, 0, issquare(n) || issquare(2*n))} /* Michael Somos, Apr 12 2004 */
(Python)
from sympy.ntheory.primetest import is_square
def A053866(n): return int(is_square(n) or is_square(n<<1)) # Chai Wah Wu, Jan 09 2023
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Henry Bottomley, Mar 29 2000
EXTENSIONS
More terms from James A. Sellers, Apr 08 2000
Alternative description added to the name by Antti Karttunen, Sep 25 2017
STATUS
approved