A053866 Parity of A000203(n), the sum of the divisors of n; a(n) = 1 when n is a square or twice a square, 0 otherwise.
1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 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, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0
Offset: 1
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
- Index entries for characteristic functions
Crossrefs
Programs
-
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 *)
-
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
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
Extensions
More terms from James Sellers, Apr 08 2000
Alternative description added to the name by Antti Karttunen, Sep 25 2017
Comments