Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #16 Sep 17 2023 11:32:15
%S 0,1,2,3,4,5,6,7,8,9,4,5,6,7,8,9,10,11,12,13,8,9,10,11,12,13,14,15,16,
%T 17,12,13,14,15,16,17,18,19,20,21,16,17,18,19,20,21,22,23,24,25,20,21,
%U 22,23,24,25,26,27,28,29,24,25,26,27,28,29,30,31,32,33,28,29,30,31,32,33,34,35
%N Let n = 10x + y where 0 <= y <= 9, x >= 0. Then a(n) = 4x+y.
%H Vincenzo Librandi, <a href="/A081595/b081595.txt">Table of n, a(n) for n = 0..2000</a>
%H <a href="/index/Rec#order_11">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,0,1,-1).
%F G.f.: -x*(5*x^9 -x^8 -x^7 -x^6 -x^5 -x^4 -x^3 -x^2 -x -1) / ((x -1)^2*(x +1)*(x^4 -x^3 +x^2 -x +1)*(x^4 +x^3 +x^2 +x +1)). - _Colin Barker_, Jun 24 2014
%F a(n) = n - 6*floor(n/10). [_Bruno Berselli_, Jun 24 2014]
%t CoefficientList[Series[-x (5 x^9 - x^8 - x^7 - x^6 - x^5 - x^4 - x^3 - x^2 - x - 1)/((x - 1)^2 (x + 1) (x^4 - x^3 + x^2 - x + 1) (x^4 + x^3 + x^2 + x + 1)), {x, 0, 150}], x] (* _Vincenzo Librandi_, Jun 25 2014 *)
%t LinearRecurrence[{1,0,0,0,0,0,0,0,0,1,-1},{0,1,2,3,4,5,6,7,8,9,4},80] (* _Harvey P. Dale_, Sep 17 2023 *)
%o (PARI) my(n, x, y); vector(200, n, y=(n-1)%10; x=(n-1-y)\10; 4*x+y) \\ _Colin Barker_, Jun 24 2014
%o (Magma) k:=4; [n-(10-k)*Floor(n/10): n in [0..100]]; // _Bruno Berselli_, Jun 24 2014
%Y Cf. A081502. Different from A028899.
%K nonn
%O 0,3
%A _N. J. A. Sloane_, Apr 22 2003