login
A330707
a(n) = ( 3*n^2 + n - 1 + (-1)^floor(n/2) )/4.
4
0, 1, 3, 7, 13, 20, 28, 38, 50, 63, 77, 93, 111, 130, 150, 172, 196, 221, 247, 275, 305, 336, 368, 402, 438, 475, 513, 553, 595, 638, 682, 728, 776, 825, 875, 927, 981, 1036, 1092, 1150, 1210, 1271, 1333, 1397, 1463
OFFSET
0,3
COMMENTS
Essentially four odds followed by four evens.
Last digit is neither 4 nor 9.
Essentially twice or twin sequences in the hexagonal spiral from A002265.
21 21 21 22 22 22 22
21 14 14 14 14 15 15 23
20 13 8 8 8 9 9 15 23
20 13 8 4 4 4 4 9 15 23
20 13 7 3 1 1 1 5 9 16 23
20 13 7 3 1 0 0 2 5 10 16 24
19 12 7 3 0 0 2 5 10 16 24
19 12 7 3 2 2 5 10 16 24
19 12 6 6 6 6 10 17 24
19 12 11 11 11 11 17 25
18 18 18 18 17 17 25
.
There are 12 twin sequences. 6 of them (A001859, A006578, A077043, A231559, A024219, A281026) are in the OEIS. a(n) is the seventh.
0, 1, 3, 7, 13, 20, 28, 38, 50, ...
1, 2, 4, 6, 7, 8, 10, 12, 13, ...
1, 2, 2, 1, 1, 2, 2, 1, 1, ... period 4. See A014695.
FORMULA
a(n) = A231559(-n).
a(1+2*n) + a(2+2*n) = A033579(n+1).
a(40+n) - a(n) = 1210, 1270, 1330, 1390, 1450, ... . See 10*A016921(n).
From Colin Barker, Dec 27 2019: (Start)
G.f.: x*(1 + 2*x^2) / ((1 - x)^3*(1 + x^2)).
a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5) for n>4.
(End)
E.g.f.: (cos(x) + sin(x) + (-1 + 4*x + 3*x^2)*exp(x))/4. - Stefano Spezia, Dec 27 2019
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
MAPLE
seq((3*n^2+n-1+sqrt(2)*sin((2*n+1)*Pi/4))/4, n = 0..60); # G. C. Greubel, Dec 30 2019
MATHEMATICA
LinearRecurrence[{3, -4, 4, -3, 1}, {0, 1, 3, 7, 13}, 60] (* Amiram Eldar, Dec 27 2019 *)
PROG
(PARI) concat(0, Vec(x*(1 + 2*x^2) / ((1 - x)^3*(1 + x^2)) + O(x^60))) \\ Colin Barker, Dec 27 2019
(Magma) [(3*n^2+n-1+ (-1)^Floor(n/2))/4: n in [0..60]]; // G. C. Greubel, Dec 30 2019
(Sage) [(3*n^2+n-1+(-1)^floor(n/2))/4 for n in (0..60)] # G. C. Greubel, Dec 30 2019
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Dec 27 2019
STATUS
approved