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.

A120385 If a(n-1) = 1 then largest value so far + 1, otherwise floor(a(n-1)/2); or table T(n,k) with T(n,0) = n, T(n,k+1) = floor(T(n,k)/2).

This page as a plain text file.
%I A120385 #25 Dec 11 2019 23:43:35
%S A120385 1,2,1,3,1,4,2,1,5,2,1,6,3,1,7,3,1,8,4,2,1,9,4,2,1,10,5,2,1,11,5,2,1,
%T A120385 12,6,3,1,13,6,3,1,14,7,3,1,15,7,3,1,16,8,4,2,1,17,8,4,2,1,18,9,4,2,1,
%U A120385 19,9,4,2,1,20,10,5,2,1,21,10,5,2,1,22,11,5,2,1,23,11,5,2,1,24,12,6,3,1,25
%N A120385 If a(n-1) = 1 then largest value so far + 1, otherwise floor(a(n-1)/2); or table T(n,k) with T(n,0) = n, T(n,k+1) = floor(T(n,k)/2).
%C A120385 Although not strictly a fractal sequence as defined in the Kimberling link, this sequence has many fractal properties. If the first instance of each value is removed, the result is the original sequence with each row repeated twice. Removing all odd-indexed instances of each value does give the original sequence.
%H A120385 Alois P. Heinz, <a href="/A120385/b120385.txt">Rows n = 1..2048, flattened</a>
%H A120385 C. Kimberling, <a href="http://faculty.evansville.edu/ck6/integer/fractals.html">Fractal sequences</a>
%F A120385 T(n,k) = floor(n/2^(k-1)).
%F A120385 From _Peter Bala_, Feb 02 2013: (Start)
%F A120385 The n-th row polynomial R(n,t) = Sum_{k>=0} t^k*floor(n/2^k) and satisfies the recurrence equation R(n,t) = t*R(floor(n/2),t) + n, with R(1,t) = 1.
%F A120385 O.g.f. Sum_{n>=1} R(n,t)*x^n = 1/(1-x)*Sum_{n>=0} t^n*x^(2^n)/(1 - x^(2^n)).
%F A120385 Product_{n>=1} ( 1 + x^((t^n - 2^n)/(t-2)) ) = 1 + Sum_{n>=1} x^R(n,t) = 1 + x + x^(2 + t) + x^(3 + t) + x^(4 + 2*t + t^2) + .... For related sequences see A050292 (t = -1), A001477(t = 0), A005187 (t = 1) and A080277 (t = 2).
%F A120385 (End)
%e A120385 The table starts:
%e A120385   1;
%e A120385   2, 1;
%e A120385   3, 1;
%e A120385   4, 2, 1;
%e A120385   5, 2, 1;
%e A120385   6, 3, 1;
%e A120385   7, 3, 1;
%e A120385   8, 4, 2, 1;
%p A120385 T:= proc(n) T(n):= `if`(n=1, 1, [n, T(iquo(n, 2))][]) end:
%p A120385 seq(T(n), n=1..30);  # _Alois P. Heinz_, Feb 12 2019
%t A120385 Flatten[Function[n,NestWhile[Append[#, Floor[Last[#]/2]] &, {n}, Last[#] != 1 &]][#] & /@ Range[50]] (* _Birkas Gyorgy_, Apr 14 2011 *)
%Y A120385 Cf. A029837 (row lengths), A083652 (position of first n).
%Y A120385 Cf. A005187 (row sums). A001477, A050292, A080277.
%Y A120385 Cf. A000027, A004526, A002265, A132292.
%K A120385 nonn,tabf
%O A120385 1,2
%A A120385 _Franklin T. Adams-Watters_, Jun 29 2006