A004977 Sum of digits of n-th term in Look and Say sequence A005150.
1, 2, 3, 5, 8, 10, 13, 16, 23, 32, 44, 56, 76, 102, 132, 174, 227, 296, 383, 505, 679, 892, 1151, 1516, 1988, 2602, 3400, 4410, 5759, 7519, 9809, 12810, 16710, 21758, 28356, 36955, 48189, 62805, 81803, 106647, 139088, 181301, 236453, 308150, 401689
Offset: 1
Links
- Peter J. C. Moses, Table of n, a(n) for n = 1..1000
- Albert Frank, International Contest Of Logical Sequences, 2002 - 2003. Item 9
- Albert Frank, Solutions of International Contest Of Logical Sequences, 2002 - 2003.
Programs
-
Mathematica
RunLengthEncode[ x_List ] := (Through[ {First, Length}[ #1 ] ] &) /@ Split[ x ]; LookAndSay[ n_, d_:1 ] := NestList[ Flatten[ Reverse /@ RunLengthEncode[ # ] ] &, {d}, n - 1 ]; F[ n_ ] := LookAndSay[ n, 1 ][ [ n ] ]; Table[ Apply[ Plus, F[ n ] ], {n, 1, 51} ] p={-4,8,-7,-10,15,18,11,-65,-4,27,7,9,-62,47,56,-32,-46,-8,67,44,-16,24,2,-59,-20,-65,84,122,-51,-38,-131,10,91,24,39,-89,-42,39,12,45,-40,-63,39,40,10,-19,-58,47,51,-7,-43,-67,32,41,20,-13,-24,-3,8,0,0,0,0,10,5,-3,-11,-6,5,7,3,-2,-1,-1,-1,-1,0,1,1}; q={6,-9,9,-18,16,-11,14,-8,1,-5,7,2,8,-14,-5,-5,19,3,-6,-7,-6,16,-7,8,-22,17,-12,7,5,7,-8,4,-7,-9,13,-4,-6,14,-14,19,-7,-13,2,-4,18,0,-1,-4,-12,8,-5,0,8,1,7,-8,-5,-2,3,3,0,0,0,0,-2,-1,0,3,1,-1,-1,-1,1}; gf=Fold[x #1+#2&,0,p]/Fold[x #1+#2&,0,q]; CoefficientList[Series[gf,{x,0,99}],x] (* Peter J. C. Moses, Jun 24 2013 *)
Comments