[go: up one dir, main page]

login
A318504
SumXOR of divisors of n, up to, but not including the second largest of them A032742(n); a(1) = 0 by convention.
2
0, 0, 0, 1, 0, 3, 0, 3, 1, 3, 0, 4, 0, 3, 2, 7, 0, 6, 0, 2, 2, 3, 0, 10, 1, 3, 2, 0, 0, 9, 0, 15, 2, 3, 4, 7, 0, 3, 2, 0, 0, 15, 0, 12, 14, 3, 0, 22, 1, 12, 2, 10, 0, 29, 4, 6, 2, 3, 0, 26, 0, 3, 12, 31, 4, 27, 0, 22, 2, 5, 0, 5, 0, 3, 8, 20, 6, 17, 0, 4, 11, 3, 0, 14, 4, 3, 2, 18, 0, 3, 6, 16, 2, 3, 4, 46, 0, 10, 0, 5, 0, 53, 0, 24, 26
OFFSET
1,6
FORMULA
a(n) = A032742(n) XOR A227320(n).
For n > 1, a(n) = A106409(n) XOR A178910(n).
PROG
(PARI)
A032742(n) = if(1==n, n, n/vecmin(factor(n)[, 1]));
A318504(n) = { my(v=0); fordiv(n, d, if(d<A032742(n), v = bitxor(v, d))); (v); };
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 28 2018
STATUS
approved