A046639 Length of A001388(n).
1, 2, 2, 4, 6, 7, 10, 12, 18, 25, 31, 41, 56, 73, 96, 128, 171, 226, 302, 399, 533, 704, 937, 1236, 1645, 2170, 2884, 3806, 5059, 6680, 8875, 11725, 15575, 20584, 27332, 36132, 47963, 63420, 84160, 111306, 147673, 195345, 259118, 342831, 454680
Offset: 1
Links
- Peter J. C. Moses, Table of n, a(n) for n = 1..1000
- N. Johnston, Further Variants of the “Look-and-Say” Sequence
- Index entries for linear recurrences with constant coefficients, signature (0,2,1,0,-2,-2,0,2,2,0,-1,-1).
Programs
-
Mathematica
p={-1,3,4,1,-2,-4,-4,1,5,1,0,0,-1,0,-1,0,2,1}; q={1,1,0,-2,-2,0,2,2,0,-1,-2,0,1}; gf=Fold[x #1+#2&,0,p]/Fold[x #1+#2&,0,q]; CoefficientList[Series[gf,{x,0,100}],x] (* Peter J. C. Moses, Jun 21 2013 *) LinearRecurrence[{0,2,1,0,-2,-2,0,2,2,0,-1,-1},{1,2,2,4,6,7,10,12,18,25,31,41,56,73,96,128,171,226},50] (* Harvey P. Dale, Mar 08 2022 *)
-
PARI
Vec(x*(1 + 2*x - x^3 - x^5 + x^8 + 5*x^9 + x^10 - 4*x^11 - 4*x^12 - 2*x^13 + x^14 + 4*x^15 + 3*x^16 - x^17) / ((1 - x)*(1 + x)*(1 + x^2)*(1 - x^2 - x^3)*(1 - x^2 + x^5)) + O(x^50)) \\ Colin Barker, Jul 01 2020
Formula
From Colin Barker, Jul 01 2020: (Start)
G.f.: x*(1 + 2*x - x^3 - x^5 + x^8 + 5*x^9 + x^10 - 4*x^11 - 4*x^12 - 2*x^13 + x^14 + 4*x^15 + 3*x^16 - x^17) / ((1 - x)*(1 + x)*(1 + x^2)*(1 - x^2 - x^3)*(1 - x^2 + x^5)).
a(n) = 2*a(n-2) + a(n-3) - 2*a(n-5) - 2*a(n-6) + 2*a(n-8) + 2*a(n-9) - a(n-11) - a(n-12) for n>18.
(End)
Comments