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.

A082009 a(n) is the label of parent node of node n in tree shown in A082007.

This page as a plain text file.
%I A082009 #13 May 08 2017 18:44:14
%S A082009 0,0,1,3,3,1,6,6,2,9,9,2,12,12,4,15,15,16,18,18,16,21,21,17,24,24,17,
%T A082009 27,27,4,30,30,31,33,33,31,36,36,32,39,39,32,42,42,5,45,45,46,48,48,
%U A082009 46,51,51,47,54,54,47,57,57,5,60,60,61,63
%N A082009 a(n) is the label of parent node of node n in tree shown in A082007.
%H A082009 Ivan Neretin, <a href="/A082009/b082009.txt">Table of n, a(n) for n = 1..10000</a>
%t A082009 w = {{0}}; a = ConstantArray[0, 254]; Do[k = 2^Floor@Log2[n - 1]; AppendTo[w, Flatten@Table[w[[n - k]] + (2^k - 1) i, {i, 2^k}]]; a[[w[[-1]]]] = Riffle[#, #] &@w[[-2]], {n, 2, 8}]; a (* _Ivan Neretin_, Mar 12 2017 *)
%K A082009 nonn,easy
%O A082009 1,4
%A A082009 _N. J. A. Sloane_, Oct 06 2009, based on a posting by Steve Witham (sw(AT)tiac.net) to the Math Fun Mailing List, Sep 30 2009