OFFSET
0,12
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,0,0,0,0,0,1,-2,1).
FORMULA
a(n) = (1/2)*floor(n/10)*(2n-8-10*floor(n/10)).
G.f.: x^10/((1-x^10)(1-x)^2).
From Philippe Deléham, Mar 27 2013: (Start)
a(10n) = A051624(n).
a(10n+1) = A135706(n).
a(10n+2) = A147874(n+1).
a(10n+3) = 2*A005476(n).
a(10n+4) = A033429(n).
a(10n+5) = A202803(n).
a(10n+6) = A168668(n).
a(10n+7) = 2*A147875(n).
a(10n+8) = A135705(n).
a(10n+9) = A124080(n). (End)
a(n) = A008728(n-10) for n>= 10. - Georg Fischer, Nov 03 2018
EXAMPLE
As square array :
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
12, 14, 16, 18, 20, 22, 24, 26, 28, 30
33, 36, 39, 42, 45, 48, 51, 54, 57, 60
64, 68, 72, 76, 80, 84, 88, 92, 96, 100
105, 110, 115, 120, 125, 130, 135, 140, 145, 150
156, 162, 168, 174, 180, 186, 192, 198, 204, 210
... - Philippe Deléham, Mar 27 2013
MATHEMATICA
Table[(1/2)*Floor[n/10]*(2*n - 8 - 10*Floor[n/10]), {n, 0, 50}] (* G. C. Greubel, Dec 13 2016 *)
Accumulate[Table[FromDigits[Most[IntegerDigits[n]]], {n, 0, 110}]] (* or *) LinearRecurrence[{2, -1, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2}, 120] (* Harvey P. Dale, Apr 06 2017 *)
PROG
(PARI) for(n=0, 50, print1((1/2)*floor(n/10)*(2n-8-10*floor(n/10)), ", ")) \\ G. C. Greubel, Dec 13 2016
(PARI) a(n)=my(k=n\10); k*(n-5*k-4) \\ Charles R Greathouse IV, Dec 13 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, Jun 21 2007
STATUS
approved