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.

A265158 a(1) = 1, a(2*n) = 2*a(n), a(2*n+1) = floor(a(n)/2).

This page as a plain text file.
%I A265158 #7 Jan 22 2022 10:12:49
%S A265158 1,2,0,4,1,0,0,8,2,2,0,0,0,0,0,16,4,4,1,4,1,0,0,0,0,0,0,0,0,0,0,32,8,
%T A265158 8,2,8,2,2,0,8,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,16,16,
%U A265158 4,16,4,4,1,16,4,4,1,4,1,0,0,16,4,4,1,4,1,0
%N A265158 a(1) = 1, a(2*n) = 2*a(n), a(2*n+1) = floor(a(n)/2).
%C A265158 All terms are either zero or a power of 2;
%C A265158 a(2^k) = 2^k; for k > 1: a(2^k+1) = 2^(k-2); a(2^k-1) = 0;
%C A265158 A264784 gives lengths of runs of zeros.
%H A265158 Reinhard Zumkeller, <a href="/A265158/b265158.txt">Table of n, a(n) for n = 1..2047</a>
%o A265158 (Haskell)
%o A265158 import Data.List (transpose)
%o A265158 a265158 n = a265158_list !! (n-1)
%o A265158 a265158_list = 1 : concat
%o A265158    (transpose [map (* 2) a265158_list, map (flip div 2) a265158_list])
%o A265158 (PARI) a(n) = if (n==1, 1, if (n%2, a(n\2)\2, 2*a(n\2))); \\ _Michel Marcus_, Jan 22 2022
%Y A265158 Cf. A000051, A000079, A000225, A131577, A264784.
%K A265158 nonn
%O A265158 1,2
%A A265158 _Reinhard Zumkeller_, Dec 04 2015