login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A260699 a(2n+6) = a(2n) + 12*n + 20, a(2n+1) = (n+1)*(2*n+1), with a(0)=0, a(2)=2, a(4)=9. 5
0, 1, 2, 6, 9, 15, 20, 28, 34, 45, 53, 66, 76, 91, 102, 120, 133, 153, 168, 190, 206, 231, 249, 276, 296, 325, 346, 378, 401, 435, 460, 496, 522, 561, 589, 630, 660, 703, 734, 780, 813, 861, 896, 946, 982, 1035, 1073 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Sequence extended to left:

..., 36, 29, 21, 16, 10, 6, 3, 1, 0, 0, 1, 2, 6, 9, 15, 20, 28, 34, ...,

where 0, 1, 3, 6, 10, 16, 21, 29, 36, 46, ... is A260708.

After 2, if a(n) is prime then n == 4 (mod 6).

a(n) is a square for n = 0, 1, 4, 49, 52, 192, 1681, 4948, 57121, 60388, 221952, 1940449, 5710372, ...

LINKS

Table of n, a(n) for n=0..46.

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

FORMULA

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

a(n) = a(n-1) +  a(n-2) - a(n-3) + a(n-6) - a(n-7) - a(n-8) + a(n-9).

a(2*k+1) = A000217(2*k+1) by definition; for even indices:

a(6*k)   = 2*k*(9*k + 1),

a(6*k+2) = 2*(9*k^2 + 7*k + 1),

a(6*k+4) = 18*k^2 + 26*k + 9.

a(n) = n*(n + 1)/2 - (1 + (-1)^n)*floor(n/6 + 2/3)/2. [Bruno Berselli, Nov 18 2015]

EXAMPLE

a(0) = 0,

a(1) = 1*1 = 1,

a(2) = 2,

a(3) = 2*3 = 6,

a(4) = 9,

a(5) = 3*5 = 15,

a(6) = a(0) + 12*0 + 20 = 20, etc.

MATHEMATICA

LinearRecurrence[{1, 1, -1, 0, 0, 1, -1, -1, 1}, {0, 1, 2, 6, 9, 15, 20, 28, 34}, 50] (* Bruno Berselli, Nov 18 2015 *)

PROG

(MAGMA) [n*(n+1)/2-(1+(-1)^n)*Floor(n/6+2/3)/2: n in [0..50]]; // Bruno Berselli, Nov 18 2015

(Sage) [n*(n+1)/2-(1+(-1)^n)*floor(n/6+2/3)/2 for n in (0..50)] # Bruno Berselli, Nov 18 2015

CROSSREFS

Cf. A000217, A264041, A260708.

Sequence in context: A120387 A325761 A176039 * A084265 A084140 A294864

Adjacent sequences:  A260696 A260697 A260698 * A260700 A260701 A260702

KEYWORD

nonn,easy

AUTHOR

Paul Curtz, Nov 16 2015

EXTENSIONS

Edited by Bruno Berselli, Nov 17 2015

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 September 17 01:53 EDT 2021. Contains 347478 sequences. (Running on oeis4.)