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.

A151758 G.f.: Theta^2-Theta, where Theta = Sum_{k>=0} x^(2^k).

This page as a plain text file.
%I A151758 #5 Mar 31 2021 04:33:59
%S A151758 0,-1,0,2,0,2,2,0,0,2,2,0,2,0,0,0,0,2,2,0,2,0,0,0,2,0,0,0,0,0,0,0,0,2,
%T A151758 2,0,2,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,
%U A151758 2,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0
%N A151758 G.f.: Theta^2-Theta, where Theta = Sum_{k>=0} x^(2^k).
%C A151758 If we omit the "-x" term and divide by 2, we get the characteristic function of the numbers with binary weight 2 (A018900, A151774).
%t A151758 w[n_] := IntegerDigits[n, 2] // Total;
%t A151758 a[n_] := If[n == 1, -1, 2 Boole[w[n] == 2]];
%t A151758 a /@ Range[0, 104] (* _Jean-François Alcover_, Mar 31 2021 *)
%Y A151758 Cf. A000079, A073267, A151759, A151760, A151761, A151762, A018900, A151774.
%K A151758 sign
%O A151758 0,4
%A A151758 _N. J. A. Sloane_, Jun 22 2009