OFFSET
9,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 9..1000
Project Euler, Problem 834: Add and Divide.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = (n^2 + n - 90)/2 = (n-9)*(n+10)/2 = n*(n+1)/2 - 45.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3), n>=13.
a(n) = n + a(n-1) (with a(9) = 0). - Vincenzo Librandi, Aug 06 2010
G.f.: x^10*(10 - 9*x)/(1-x)^3.
From Amiram Eldar, Jan 10 2021: (Start)
Sum_{n>=10} (-1)^n/a(n) = 4*log(2)/19 - 33464927/442305864. (End)
E.g.f.: (1/8!)*(1814400 +1774080*x +846720*x^2 +262080*x^3 +58800*x^4 +10080*x^5 +1344*x^6 +136*x^7 +9*x^8 - (1814400 -40320*x -20160*x^2)*exp(x)). - G. C. Greubel, Jul 31 2022
EXAMPLE
a(10) = 10 + 0 = 10;
a(11) = 11 + 10 = 21;
a(12) = 12 + 21 = 33.
MAPLE
MATHEMATICA
Table[n(n+1)/2 -45, {n, 9, 100}] (* Vladimir Joseph Stephan Orlovsky, Jun 15 2011 *)
#-45&/@Drop[Accumulate[Range[60]], 8] (* Harvey P. Dale, Jul 24 2011 *)
LinearRecurrence[{3, -3, 1}, {0, 10, 21}, 60] (* Harvey P. Dale, Mar 25 2015 *)
PROG
(PARI) a(n)=(n-9)*(n+10)/2;
(Magma) [(n-9)*(n+10)/2: n in [9..80]]; // G. C. Greubel, Jul 31 2022
(SageMath) [(n-9)*(n+10)/2 for n in (9..80)] # G. C. Greubel, Jul 31 2022
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 21 1999
EXTENSIONS
More terms from Zerinvary Lajos, Oct 01 2006
STATUS
approved