login
A087917
Number of unordered ways to write n as a sum of 3 odious numbers (A000069).
2
0, 0, 1, 1, 1, 2, 1, 1, 2, 3, 2, 3, 3, 2, 4, 6, 5, 5, 6, 5, 6, 8, 8, 9, 9, 8, 10, 12, 12, 14, 14, 10, 14, 19, 14, 18, 20, 14, 19, 25, 21, 20, 27, 22, 23, 32, 26, 27, 31, 29, 31, 36, 35, 35, 39, 34, 38, 47, 40, 42, 47, 40, 43, 60, 53, 44, 60, 50, 48, 68, 62, 54, 64, 65, 58, 75
OFFSET
1,6
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000 (first 200 terms from Robert Price)
FORMULA
a(n) = Sum_{i+j+k = n} A010060(i)*A010060(j)*A010060(k). - Benoit Cloitre, Mar 19 2004
EXAMPLE
a(6) = 2 as 6 = 1 + 1 + 4 = 2 + 2 + 2. 1, 2 and 4 are odious as the number of ones in the binary expansion is odd. The partition 1 + 2 + 3 does not count as 3 is not odious; the number of ones in the binary expansion of 3 is 2 (even). - David A. Corneth, Apr 23 2025
MATHEMATICA
A010060 = Cases[Import["https://oeis.org/A010060/b010060.txt", "Table"], {_, _}][[All, 2]];
Table[Length@Select[DeleteDuplicates[Sort /@ Select[Tuples[Range[n], 3], Total[#] == n &]], A010060[[#[[1]] + 1]]*A010060[[#[[2]] + 1]]* A010060[[#[[3]] + 1]] == 1 &], {n, 200}] (* Robert Price, Apr 22 2025 *)
PROG
(PARI) a(n)=sum(i=1, n, sum(j=1, i, sum(k=1, j, if(i+j+k-n, 0, A010060(i)*A010060(j)*A010060(k)))))
(PARI) first(n) = {
res = vector(n);
for(i = 1, n\3,
if(bitand(hammingweight(i), 1),
for(j = i, (n - i)\2,
if(bitand(hammingweight(j), 1),
for(k = j, n - i - j,
res[i+j+k]+=bitand(hammingweight(k), 1)))))); res
} \\ David A. Corneth, Apr 23 2025
CROSSREFS
Cf. A010060.
Sequence in context: A091093 A049615 A114919 * A330334 A087741 A054991
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Oct 18 2003
STATUS
approved