login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A090639 a(0) = 0; a(2n) = 3*a(n), a(2n+1) = a(n) + 1. 2
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, 8, 27, 10, 12, 5, 243, 82, 84, 29, 90, 31, 33, 12, 108, 37, 39, 14, 45, 16, 18, 7, 162, 55, 57, 20, 63, 22, 24, 9, 81, 28, 30, 11, 36, 13, 15, 6, 729, 244, 246, 83, 252, 85, 87, 30, 270, 91 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
N. J. A. Sloane and J. A. Sellers, On non-squashing partitions, Discrete Math., 294 (2005), 259-274.
MAPLE
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;
MATHEMATICA
a[0] = 0; a[n_] := a[n] = If[EvenQ[n], 3*a[n/2], a[(n - 1)/2] + 1];
Table[a[n], {n, 0, 73}] (* Jean-François Alcover, Jan 18 2018 *)
CROSSREFS
Sequence in context: A104005 A224578 A134562 * A294370 A325984 A178774
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 14 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 28 17:13 EST 2024. Contains 370400 sequences. (Running on oeis4.)