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.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Henry Bottomley, Mar 29 2000

Keywords

Comments

Partial sums up to n is about n/2. - David A. Corneth, Oct 20 2017

Examples

			a(9) = 0 because sum of proper divisors of 9 is 1 + 3 = 4 which is an even number.
From _David A. Corneth_, Oct 20 2017: (Start)
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.
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)
		

Crossrefs

Programs

  • Mathematica
    a[n_] = Mod[DivisorSigma[1, n] - n, 2]; Array[a, 100] (* Amiram Eldar, Jan 30 2025 *)
  • PARI
    A053867(n) = ((sigma(n)-n)%2); \\ Antti Karttunen, Oct 20 2017
    
  • 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

Formula

a(n) = A001065(n) mod 2.
a(2n+1) = 1 - A010052(2n+1); a(4n + 2) = 1 - a(2n + 1); a(4n) = a(2n). - David A. Corneth, Oct 20 2017
From Amiram Eldar, Jan 30 2025: (Start)
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.
Sum_{k=1..n} a(k) = n/2 + sqrt(n/2) + o(sqrt(n)). (End)

Extensions

More terms from James Sellers, Apr 08 2000