|
|
A026532
|
|
Ratios of successive terms are 3, 2, 3, 2, 3, 2, 3, 2, ...
|
|
21
|
|
|
1, 3, 6, 18, 36, 108, 216, 648, 1296, 3888, 7776, 23328, 46656, 139968, 279936, 839808, 1679616, 5038848, 10077696, 30233088, 60466176, 181398528, 362797056, 1088391168, 2176782336, 6530347008, 13060694016, 39182082048, 78364164096, 235092492288, 470184984576
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Preface the series with a 1: (1, 1, 3, 6, 18, 36, ...); then the next term in the series = (1, 1, 3, 6, ...) dot (1, 2, 1, 2, ...). Example: 36 = (1, 1, 3, 6, 18) dot (1, 2, 1, 2, 1) = (1 + 2 + 3 + 12 + 18). - Gary W. Adamson, Apr 18 2009
|
|
LINKS
|
|
|
FORMULA
|
a(n) = T(n, 0) + T(n, 1) + ... + T(n, 2n-2), T given by A026519.
a(n) = (1/2)*(5+(-1)^n)*a(n-1) for n>1, a(1) = 1.
a(n) = (1/4)*(3-(-1)^n)*6^floor(n/2). (End)
G.f.: x*(1+3*x)/(1-6*x^2).
a(n+2) = 6*a(n). (End)
a(n) = (1/2)*6^((n-2)/2)*(3*(1+(-1)^n) + sqrt(6)*(1-(-1)^n)). - G. C. Greubel, Dec 21 2021
|
|
MATHEMATICA
|
FoldList[(2 + Boole[EvenQ@ #2]) #1 &, Range@ 28] (* or *)
CoefficientList[Series[x*(1+3x)/(1-6x^2), {x, 0, 31}], x] (* Michael De Vlieger, Aug 02 2017 *)
LinearRecurrence[{0, 6}, {1, 3}, 30] (* Harvey P. Dale, Jul 11 2018 *)
|
|
PROG
|
(Magma) [(1/4)*(3-(-1)^n)*6^Floor(n/2) : n in [1..30]]; // Vincenzo Librandi, Jun 08 2011
(Haskell)
a026532 n = a026532_list !! (n-1)
a026532_list = scanl (*) 1 $ a176059_list
(Python)
def a(n): return (3 if n%2 else 1)*6**(n//2)
(Sage) [(1/2)*6^((n-2)/2)*(3*(1+(-1)^n) + sqrt(6)*(1-(-1)^n)) for n in (1..30)] # G. C. Greubel, Dec 21 2021
|
|
CROSSREFS
|
Cf. A026519, A026520, A026521, A026522, A026523, A026524, A026525, A026526, A026527, A026528, A026529, A026530, A026531, A026533, A026534, A027262, A027263, A027264, A027265, A027266.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|