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.

A309057 a(0) = 1; a(2*n) = 3*a(n), a(2*n+1) = a(n).

This page as a plain text file.
%I A309057 #17 Jul 10 2019 21:24:53
%S A309057 1,1,3,1,9,3,3,1,27,9,9,3,9,3,3,1,81,27,27,9,27,9,9,3,27,9,9,3,9,3,3,
%T A309057 1,243,81,81,27,81,27,27,9,81,27,27,9,27,9,9,3,81,27,27,9,27,9,9,3,27,
%U A309057 9,9,3,9,3,3,1,729,243,243,81,243,81,81,27,243,81,81,27,81,27,27,9,243
%N A309057 a(0) = 1; a(2*n) = 3*a(n), a(2*n+1) = a(n).
%F A309057 G.f. A(x) satisfies: A(x) = (3 + x) * A(x^2) - 2.
%F A309057 a(0) = 1; for n > 0, a(n) = 3^(number of 0's in binary representation of n).
%t A309057 a[0] = 1; a[n_] := If[EvenQ[n], 3 a[n/2], a[(n - 1)/2]]; Table[a[n], {n, 0, 80}]
%t A309057 nmax = 80; A[_] = 1; Do[A[x_] = (3 + x) A[x^2] - 2 + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
%t A309057 Join[{1}, Table[3^Count[IntegerDigits[n, 2], 0], {n, 1, 80}]]
%Y A309057 Cf. A000225 (positions of 1's), A000244, A023416, A048883, A080100, A080791, A309074.
%K A309057 nonn
%O A309057 0,3
%A A309057 _Ilya Gutkovskiy_, Jul 10 2019