%I #27 Jan 22 2024 05:53:11
%S 1,4,7,10,11,14,17,18,21,24,25,28,31,32,35,38,39,42,45,46,49,52,53,56,
%T 59,60,63,66,67,70,73,74,77,80,81,84,87,88,91,94,95,98,101,102,105,
%U 108,109,112,115,116,119,122,123,126,129,130,133,136,137,140,143,144
%N Digit sum of A082205(n).
%H G. C. Greubel, <a href="/A082206/b082206.txt">Table of n, a(n) for n = 1..5000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F For n>1, a(n+3) = a(n) + 7.
%F a(n) = A007953(A082205(n)).
%F G.f.: x*(1 + 3*x + 3*x^2 + 2*x^3 - 2*x^4)/((1-x)*(1-x^3)). - _Vladimir Joseph Stephan Orlovsky_, Jan 26 2012
%F a(n) = -a(n-1) - a(n-2) + 7*(n-1), for n >= 4, with a(n) = 3*n-2 for n < 4. - _G. C. Greubel_, Jan 22 2024
%e The first six palindromes are 1, 22, 232, 3223, 22322, 232232.
%t CoefficientList[Series[(1+3x+3x^2+2x^3-2x^4)/((1-x)*(1-x^3)),{x,0,70}],x] (* _Vladimir Joseph Stephan Orlovsky_, Jan 26 2012 *)
%t Join[{1},LinearRecurrence[{1, 0, 1, -1},{4, 7, 10, 11},61]] (* _Ray Chandler_, Aug 25 2015 *)
%o (Magma) R<x>:=PowerSeriesRing(Integers(), 70); Coefficients(R!( (1+3*x+3*x^2+2*x^3-2*x^4)/((1-x)*(1-x^3)) )); // _G. C. Greubel_, Jan 22 2024
%o (SageMath)
%o def a(n): # a = A082206
%o if n<5: return 3*n-2
%o else: return a(n-3) + 7
%o [a(n) for n in range(1,71)] # _G. C. Greubel_, Jan 22 2024
%Y Cf. A007953, A047342, A082204, A082205.
%K base,easy,nonn,less
%O 1,2
%A _Amarnath Murthy_, Apr 10 2003
%E Edited by _Don Reble_, Mar 13 2006
%E Offset corrected by _Mohammed Yaseen_, Aug 15 2023
|