(MAGMAMagma) I:=[1, 3, 7, 10, 16]; [n le 5 select I[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..60]]; // Vincenzo Librandi, Mar 13 2018
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”).
(MAGMAMagma) I:=[1, 3, 7, 10, 16]; [n le 5 select I[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..60]]; // Vincenzo Librandi, Mar 13 2018
reviewed
approved
proposed
reviewed
editing
proposed
<a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2, 0, -2, 1).
From R. J. Mathar, Nov 04 2008: (Start)
a(n) = A026035(n+1) - A026035(n), n>1.
a(n) = A026035(n+1)-A026035(n), n>1. G.f.: x(1+x+x^2-2x^3+x^4)/((1+x)(1-x)^3). a(n)=2*a(n-1)-2*a(n-3)+a(n-4), n>5. [_R. J. Mathar_, Nov 04 2008]
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4), n>5. (End)
proposed
editing
editing
proposed
(Python)
def A114113(n): return 1 if n == 1 else (m:=n//2)*(n+1) + (n+1-m)*(n-2*m) # Chai Wah Wu, May 24 2022
approved
editing
proposed
approved
editing
proposed
Needs a b-file. - N. J. A. Sloane, Mar 12 2018