OFFSET
0,2
COMMENTS
Powers of 2 need 1 term or 2 terms parenthesized, whereas powers of 3 need 2 or 3 terms parenthesized, when 3 then the middle term is a power of 2. See A227928. - Reinhard Zumkeller, Oct 09 2013
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
EXAMPLE
. a(0) = _^0
. a(1) = 2^1
. a(1) + a(2) = 2 + 1 = 3^1
. a(2) + a(3) = 1 + 3 = 4 = 2^2
. a(3) + a(4) = 3 + 6 = 9 = 3^2
. a(4) + a(5) = 6 + 2 = 8 = 2^3
. a(6) = 16 = 2^4
. a(5) + a(6) + a(7) = 2 + 16 + 9 = 27 = 3^3
. a(7) + a(8) = 9 + 23 = 32 = 2^5
. a(8) + a(9) = 23 + 58 = 81 = 3^4
. a(9) + a(10) = 58 + 6 = 64 = 2^6
. a(11) = 128 = 2^7
. a(10) + a(11) + a(12) = 6 + 128 + 109 = 243 = 3^5
. a(12) + a(13) = 109 + 147 = 256 = 2^8
. a(14) = 512 = 2^9
. a(13) + a(14) + a(15) = 147 + 512 + 70 = 3^6 = 729 .
PROG
(Haskell)
a006895 n = a006895_list !! n
a006895_list = 1 : f 0 0 (tail a000079_list) (tail a000244_list) where
f x y us'@(u:us) vs'@(v:vs)
| x > 0 = (u - x) : f 0 (u - x + y) us vs'
| y > v - u = (v - y) : f (v + x - y) 0 us' vs
| otherwise = u : f 0 (u + y) us vs'
-- Reinhard Zumkeller, Oct 09 2013
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
N. J. A. Sloane, K. S. Brown [ kevin2003(AT)delphi.com ]
STATUS
approved