|
|
A053867
|
|
Parity of sum of divisors of n less than n.
|
|
2
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(9) = 0 because sum of proper divisors of 9 is 1 + 3 = 4 which is an even number.
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)
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|