login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A038707 a(n) = floor(n*(n+1/2)/2). 2
0, 0, 2, 5, 9, 13, 19, 26, 34, 42, 52, 63, 75, 87, 101, 116, 132, 148, 166, 185, 205, 225, 247, 270, 294, 318, 344, 371, 399, 427, 457, 488, 520, 552, 586, 621, 657, 693, 731, 770, 810, 850, 892, 935, 979, 1023, 1069, 1116, 1164, 1212, 1262 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Iain Fox, Table of n, a(n) for n = 0..10000

Index entries for sequences related to Beatty sequences

Index entries for linear recurrences with constant coefficients, signature (2, -1, 0, 1, -2, 1).

FORMULA

a(n) = (1/8) {4n^2 + 2n - 3 + (-1)^n - 2(-1)^[(n-1)/2] }. - Ralf Stephan, Jun 10 2005

a(n) = 2*a(n-1)-a(n-2)+a(n-4)-2*a(n-5)+a(n-6) with a(0)=0, a(1)=0, a(2)=2, a(3)=5, a(4)=9, a(5)=13. - Harvey P. Dale, Dec 27 2015

a(n) = floor(n(1+2*n))/4). - Harvey P. Dale, Dec 27 2015

From Iain Fox, Dec 21 2017: (Start)

a(n) = (-3 + (-1)^n + 2*i^(n*(1 + n)) + 2*n + 4*n^2)/8, where i is the imaginary unit.

G.f.: x^2*(2 + x + x^2)/((1 - x)^3*(1 + x)*(1 + x^2)).

(End)

MATHEMATICA

Table[Floor[(n(1+2n))/4], {n, 0, 50}] (* or *) LinearRecurrence[{2, -1, 0, 1, -2, 1}, {0, 0, 2, 5, 9, 13}, 51] (* Harvey P. Dale, Dec 27 2015 *)

PROG

(PARI) a(n) = floor(n*(n+1/2)/2) \\ Iain Fox, Dec 21 2017

(PARI) a(n) = (-3 + (-1)^n + 2*I^(n*(1 + n)) + 2*n + 4*n^2)/8 \\ Iain Fox, Dec 21 2017

(PARI) first(n) = Vec(x^2*(2 + x + x^2)/((1 - x)^3*(1 + x)*(1 + x^2)) + O(x^n), -n) \\ Iain Fox, Dec 21 2017

CROSSREFS

Cf. A082643.

Sequence in context: A129726 A122489 A120615 * A290140 A109853 A071705

Adjacent sequences:  A038704 A038705 A038706 * A038708 A038709 A038710

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, May 02 2000

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 19 04:25 EDT 2019. Contains 325144 sequences. (Running on oeis4.)