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.

A090640 a(0) = 0; a(2n) = 4*a(n), a(2n+1) = a(n) + 1.

This page as a plain text file.
%I A090640 #11 Nov 28 2017 08:44:53
%S A090640 0,1,4,2,16,5,8,3,64,17,20,6,32,9,12,4,256,65,68,18,80,21,24,7,128,33,
%T A090640 36,10,48,13,16,5,1024,257,260,66,272,69,72,19,320,81,84,22,96,25,28,
%U A090640 8,512,129,132,34,144,37,40,11,192,49,52,14,64,17,20,6,4096,1025,1028,258,1040
%N A090640 a(0) = 0; a(2n) = 4*a(n), a(2n+1) = a(n) + 1.
%H A090640 N. J. A. Sloane and J. A. Sellers, <a href="https://arxiv.org/abs/math/0312418">On non-squashing partitions</a>, arXiv:math/0312418 [math.CO], 2003.
%H A090640 N. J. A. Sloane and J. A. Sellers, <a href="https://doi.org/10.1016/j.disc.2004.11.014">On non-squashing partitions</a>, Discrete Math., 294 (2005), 259-274.
%p A090640 S := 4; 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 A090640 a[n_] := a[n] = Which[n == 0, 0, EvenQ[n], 4 a[n/2], True, a[(n-1)/2] + 1];
%t A090640 Table[a[n], {n, 0, 68}] (* _Jean-François Alcover_, Nov 28 2017 *)
%Y A090640 Cf. A087808, A090639.
%K A090640 nonn
%O A090640 0,3
%A A090640 _N. J. A. Sloane_, Dec 14 2003