login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A330707 a(n) = ( 3*n^2 + n - 1 + (-1)^floor(n/2) )/4. 4

%I #30 Sep 08 2022 08:46:24

%S 0,1,3,7,13,20,28,38,50,63,77,93,111,130,150,172,196,221,247,275,305,

%T 336,368,402,438,475,513,553,595,638,682,728,776,825,875,927,981,1036,

%U 1092,1150,1210,1271,1333,1397,1463

%N a(n) = ( 3*n^2 + n - 1 + (-1)^floor(n/2) )/4.

%C Essentially four odds followed by four evens.

%C Last digit is neither 4 nor 9.

%C Essentially twice or twin sequences in the hexagonal spiral from A002265.

%C 21 21 21 22 22 22 22

%C 21 14 14 14 14 15 15 23

%C 20 13 8 8 8 9 9 15 23

%C 20 13 8 4 4 4 4 9 15 23

%C 20 13 7 3 1 1 1 5 9 16 23

%C 20 13 7 3 1 0 0 2 5 10 16 24

%C 19 12 7 3 0 0 2 5 10 16 24

%C 19 12 7 3 2 2 5 10 16 24

%C 19 12 6 6 6 6 10 17 24

%C 19 12 11 11 11 11 17 25

%C 18 18 18 18 17 17 25

%C .

%C There are 12 twin sequences. 6 of them (A001859, A006578, A077043, A231559, A024219, A281026) are in the OEIS. a(n) is the seventh.

%C 0, 1, 3, 7, 13, 20, 28, 38, 50, ...

%C 1, 2, 4, 6, 7, 8, 10, 12, 13, ...

%C 1, 2, 2, 1, 1, 2, 2, 1, 1, ... period 4. See A014695.

%H Colin Barker, <a href="/A330707/b330707.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-4,4,-3,1).

%F a(n) = A231559(-n).

%F a(1+2*n) + a(2+2*n) = A033579(n+1).

%F a(40+n) - a(n) = 1210, 1270, 1330, 1390, 1450, ... . See 10*A016921(n).

%F From _Colin Barker_, Dec 27 2019: (Start)

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

%F a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5) for n>4.

%F (End)

%F E.g.f.: (cos(x) + sin(x) + (-1 + 4*x + 3*x^2)*exp(x))/4. - _Stefano Spezia_, Dec 27 2019

%F a(n) = ( 3*n^2 + n - 1 + sqrt(2)*sin((2*n+1)*Pi/4) )/4 = ( 3*n^2 + n - 1 + (-1)^floor(n/2) )/4. - _G. C. Greubel_, Dec 30 2019

%p seq((3*n^2+n-1+sqrt(2)*sin((2*n+1)*Pi/4))/4, n = 0..60); # _G. C. Greubel_, Dec 30 2019

%t LinearRecurrence[{3,-4,4,-3,1}, {0,1,3,7,13}, 60] (* _Amiram Eldar_, Dec 27 2019 *)

%o (PARI) concat(0, Vec(x*(1 + 2*x^2) / ((1 - x)^3*(1 + x^2)) + O(x^60))) \\ _Colin Barker_, Dec 27 2019

%o (Magma) [(3*n^2+n-1+ (-1)^Floor(n/2))/4: n in [0..60]]; // _G. C. Greubel_, Dec 30 2019

%o (Sage) [(3*n^2+n-1+(-1)^floor(n/2))/4 for n in (0..60)] # _G. C. Greubel_, Dec 30 2019

%Y Cf. A001859, A002265, A006578, A014695, A016921, A024219, A033579, A077043, A231559, A281026.

%K nonn,easy

%O 0,3

%A _Paul Curtz_, Dec 27 2019

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 01:01 EDT 2024. Contains 371696 sequences. (Running on oeis4.)