|
|
A070885
|
|
a(n) = (3/2)*a(n-1) if a(n-1) is even; (3/2)*(a(n-1)+1) if a(n-1) is odd.
|
|
15
|
|
|
1, 3, 6, 9, 15, 24, 36, 54, 81, 123, 186, 279, 420, 630, 945, 1419, 2130, 3195, 4794, 7191, 10788, 16182, 24273, 36411, 54618, 81927, 122892, 184338, 276507, 414762, 622143, 933216, 1399824, 2099736, 3149604, 4724406, 7086609, 10629915
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The smallest positive number such that A024629(a(n)) has n digits, per page 9 of the Tanton reference in Links. - Glen Whitney, Sep 17 2017
|
|
REFERENCES
|
Wolfram, S. A New Kind of Science. Champaign, IL: Wolfram Media, 2002, p. 123.
|
|
LINKS
|
|
|
FORMULA
|
For n > 1, a(n) = 3*A061419(n) = 3*floor(K*(3/2)^n) where K=1.08151366859... - Benoit Cloitre, Aug 18 2002
|
|
MAPLE
|
option remember;
if n = 1 then
return 1;
elif type(procname(n-1), 'even') then
procname(n-1) ;
else
procname(n-1)+1 ;
end if;
%*3/2 ;
end proc:
|
|
MATHEMATICA
|
NestList[If[EvenQ[#], 3/2 #, 3/2 (#+1)]&, 1, 40] (* Harvey P. Dale, May 18 2018 *)
|
|
PROG
|
(Haskell)
a070885 n = a070885_list !! (n-1)
a070885_list = 1 : map (flip (*) 3 . flip div 2 . (+ 1)) a070885_list
(Python)
from itertools import islice
def A070885_gen(): # generator of terms
a = 1
while True:
yield a
a += (a+1>>1)+(a&1)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|