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.

A134661 Number of odd coefficients in (1 + x + x^3)^n.

Original entry on oeis.org

1, 3, 3, 7, 3, 9, 7, 13, 3, 9, 9, 19, 7, 21, 13, 27, 3, 9, 9, 21, 9, 27, 19, 35, 7, 21, 21, 41, 13, 39, 27, 55, 3, 9, 9, 21, 9, 27, 21, 39, 9, 27, 27, 55, 19, 57, 35, 73, 7, 21, 21, 49, 21, 63, 41, 75, 13, 39, 39, 79, 27, 81, 55, 109, 3, 9, 9, 21, 9, 27, 21, 39, 9, 27, 27, 57, 21, 63, 39
Offset: 0

Views

Author

Steven Finch, Jan 25 2008

Keywords

Examples

			From _Omar E. Pol_, Mar 01 2015: (Start)
Written as an irregular triangle in which the row lengths are the terms of A011782, the sequence begins:
1;
3;
3,7;
3,9,7,13;
3,9,9,19,7,21,13,27;
3,9,9,21,9,27,19,35,7,21,21,41,13,39,27,55;
3,9,9,21,9,27,21,39,9,27,27,55,19,57,35,73,7,21,21,49,21,63,41,75,13,39,39,79,27,81,55,109;
3,9,9,21,9,27,21,39,9,27,27,57,21,63,39...
...
Note that in each row a fraction of the first terms are equal to 3 times the beginning of the sequence itself. For rows 0-6 the fractions are: 0, 1, 1/2, 1/2, 3/8, 3/8, 11/32. Apparently the fractions converge to a constant.
(End)
		

Crossrefs

Programs

  • Mathematica
    PolynomialMod[(1+x+x^3)^n, 2] /. x->1
  • PARI
    a(n) = {my(pol= Pol([1,0,1,1], xx)*Mod(1,2)); subst(lift(pol^n), xx, 1);} \\ Michel Marcus, Mar 01 2015