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.

A053867 Parity of sum of divisors of n less than n.

This page as a plain text file.
%I A053867 #28 Jul 02 2025 16:01:59
%S A053867 0,1,1,1,1,0,1,1,0,0,1,0,1,0,1,1,1,1,1,0,1,0,1,0,0,0,1,0,1,0,1,1,1,0,
%T A053867 1,1,1,0,1,0,1,0,1,0,1,0,1,0,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,
%U A053867 1,0,1,1,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,0,1,0,1
%N A053867 Parity of sum of divisors of n less than n.
%C A053867 Partial sums up to n is about n/2. - _David A. Corneth_, Oct 20 2017
%H A053867 Antti Karttunen, <a href="/A053867/b053867.txt">Table of n, a(n) for n = 1..16384</a>
%H A053867 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.
%H A053867 <a href="/index/Su#sums_of_divisors">Index entries for sequences related to sums of divisors</a>.
%F A053867 a(n) = A001065(n) mod 2.
%F A053867 a(2n+1) = 1 - A010052(2n+1); a(4n + 2) = 1 - a(2n + 1); a(4n) = a(2n). - _David A. Corneth_, Oct 20 2017
%F A053867 From _Amiram Eldar_, Jan 30 2025: (Start)
%F A053867 a(n) = 0 if n is an odd square, 1 is n is either an even square or twice a square, and n mod 2 otherwise.
%F A053867 Sum_{k=1..n} a(k) = n/2 + sqrt(n/2) + o(sqrt(n)). (End)
%e A053867 a(9) = 0 because sum of proper divisors of 9 is 1 + 3 = 4 which is an even number.
%e A053867 From _David A. Corneth_, Oct 20 2017: (Start)
%e A053867 a(25) = 0 because 25 is an odd square. Therefore, a(2*25) = a(50) = 1 - a(25) = 1 and a(100) = a(2*50) = 1.
%e A053867 a(27) = 1 because 17 isn't an odd square. Therefore, a(2*27) = a(54) = 1-a(27) = 0 and a(108) = a(2*54) = 0. (End)
%t A053867 a[n_] = Mod[DivisorSigma[1, n] - n, 2]; Array[a, 100] (* _Amiram Eldar_, Jan 30 2025 *)
%o A053867 (PARI) A053867(n) = ((sigma(n)-n)%2); \\ _Antti Karttunen_, Oct 20 2017
%o A053867 (PARI) first(n) = my(res = vector(n, i, i%2)); forstep(i=1,sqrtint(n),2, for(j=0,logint(n\i^2,2), c = i^2 << j; res[c] = 1 - res[c])); res \\ _David A. Corneth_, Oct 20 2017
%Y A053867 Cf. A000005, A000265, A001065, A010052, A053866.
%K A053867 nonn,easy
%O A053867 1,1
%A A053867 _Henry Bottomley_, Mar 29 2000
%E A053867 More terms from _James Sellers_, Apr 08 2000