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.

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

This page as a plain text file.
%I A090639 #9 Jan 18 2018 03:53:34
%S A090639 0,1,3,2,9,4,6,3,27,10,12,5,18,7,9,4,81,28,30,11,36,13,15,6,54,19,21,
%T A090639 8,27,10,12,5,243,82,84,29,90,31,33,12,108,37,39,14,45,16,18,7,162,55,
%U A090639 57,20,63,22,24,9,81,28,30,11,36,13,15,6,729,244,246,83,252,85,87,30,270,91
%N A090639 a(0) = 0; a(2n) = 3*a(n), a(2n+1) = a(n) + 1.
%H A090639 N. J. A. Sloane and J. A. Sellers, <a href="http://arXiv.org/abs/math.CO/0312418">On non-squashing partitions</a>, Discrete Math., 294 (2005), 259-274.
%p A090639 S := 3; f := proc(n) global S; option remember; if n=0 then RETURN(0); fi; if n mod 2 = 0 then RETURN(S*f(n/2)); else f((n-1)/2)+1; fi; end;
%t A090639 a[0] = 0; a[n_] := a[n] = If[EvenQ[n], 3*a[n/2], a[(n - 1)/2] + 1];
%t A090639 Table[a[n], {n, 0, 73}] (* _Jean-François Alcover_, Jan 18 2018 *)
%Y A090639 Cf. A087808, A090640.
%K A090639 nonn
%O A090639 0,3
%A A090639 _N. J. A. Sloane_, Dec 14 2003