cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A053866 #77 Jul 02 2025 16:01:59
%S A053866 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,
%T A053866 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,
%U A053866 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
%N 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.
%C A053866 Also parity of A001227, the number of odd divisors of n. - _Omar E. Pol_, Apr 04 2016
%C A053866 Also parity of A000593, the sum of odd divisors of n. - _Omar E. Pol_, Apr 05 2016
%C A053866 Characteristic function of A028982. - _Antti Karttunen_, Sep 25 2017
%C A053866 It appears that this is also the parity of A067742, the number of middle divisors of n. - _Omar E. Pol_, Mar 18 2018
%C A053866 Also parity of the deficiency of n (A033879) and of the abundance of n (A033880). - _Omar E. Pol_, Nov 02 2024
%H A053866 Antti Karttunen, <a href="/A053866/b053866.txt">Table of n, a(n) for n = 1..65536</a>
%H A053866 J. N. Cooper and A. W. N. Riasanovsky, <a href="http://www.math.sc.edu/~cooper/Sigma.pdf">On the Reciprocal of the Binary Generating Function for the Sum of Divisors</a>, 2012.
%H A053866 J. N. Cooper and A. W. N. Riasanovsky, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Cooper/cooper3.html">On the Reciprocal of the Binary Generating Function for the Sum of Divisors</a>, J. Int. Seq. 16 (2013) #13.1.8.
%H A053866 Michael Gilleland, <a href="/selfsimilar.html">Some Self-Similar Integer Sequences</a>
%H A053866 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F A053866 a(n) = A000203(n) mod 2. a(n)=1 iff n>0 is a square or twice a square.
%F A053866 Multiplicative with a(2^e)=1, a(p^e)=1 if e even, 0 otherwise.
%F A053866 a(n) = A093709(n) if n>0.
%F A053866 Dirichlet g.f.: zeta(2s)(1+2^-s). - _Michael Somos_, Apr 12 2004
%F A053866 a(n) = A001157(n) mod 2. - _R. J. Mathar_, Apr 02 2011
%F A053866 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
%F A053866 a(n) = A000035(A000203(n)). - _Omar E. Pol_, Oct 26 2013
%F A053866 a(n) = A063524(A286357(n)) = A063524(A292583(n)). - _Antti Karttunen_, Sep 25 2017
%F A053866 a(n) = A295896(A156552(n)). - _Antti Karttunen_, Dec 02 2017
%F A053866 a(n) = Sum_{ m: m^2|n } A019590(n/m^2). - _Andrey Zabolotskiy_, May 07 2018
%F A053866 G.f.: (theta_3(x) + theta_3(x^2))/2 - 1. - _Ilya Gutkovskiy_, May 23 2019
%F A053866 Sum_{k=1..n} a(k) ~ (1 + 1/sqrt(2)) * sqrt(n). - _Vaclav Kotesovec_, Oct 16 2020
%p A053866 A053866:= (n -> numtheory[sigma](n) mod 2):
%p A053866 seq (A053866(n), n=0..104); # _Jani Melik_, Jan 28 2011
%t A053866 Mod[DivisorSigma[1,Range[110]],2] (* _Harvey P. Dale_, Sep 04 2017 *)
%o A053866 (PARI) {a(n) = if( n<1, 0, issquare(n) || issquare(2*n))} /* _Michael Somos_, Apr 12 2004 */
%o A053866 (Python)
%o A053866 from sympy.ntheory.primetest import is_square
%o A053866 def A053866(n): return int(is_square(n) or is_square(n<<1)) # _Chai Wah Wu_, Jan 09 2023
%Y A053866 Essentially same as A093709.
%Y A053866 Cf. A000203, A000593, A001227, A028982, A033879, A033880, A286357, A292583, A295896, A019590, A025441, A145393, A359548 (Dirichlet inverse).
%K A053866 nonn,mult
%O A053866 1,1
%A A053866 _Henry Bottomley_, Mar 29 2000
%E A053866 More terms from _James Sellers_, Apr 08 2000
%E A053866 Alternative description added to the name by _Antti Karttunen_, Sep 25 2017