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.

A087917 Number of unordered ways to write n as a sum of 3 odious numbers (A000069).

Original entry on oeis.org

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

Views

Author

Ralf Stephan, Oct 18 2003

Keywords

Examples

			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
		

Crossrefs

Programs

  • 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 *)
  • 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

Formula

a(n) = Sum_{i+j+k = n} A010060(i)*A010060(j)*A010060(k). - Benoit Cloitre, Mar 19 2004