A222657 a(n) = 2 * floor( (2*n + 1) / 3) + 1.
1, 3, 3, 5, 7, 7, 9, 11, 11, 13, 15, 15, 17, 19, 19, 21, 23, 23, 25, 27, 27, 29, 31, 31, 33, 35, 35, 37, 39, 39, 41, 43, 43, 45, 47, 47, 49, 51, 51, 53, 55, 55, 57, 59, 59, 61, 63, 63, 65, 67, 67, 69, 71, 71, 73, 75, 75, 77, 79, 79, 81, 83, 83, 85, 87, 87, 89
Offset: 0
Examples
G.f. = 1 + 3*x + 3*x^2 + 5*x^3 + 7*x^4 + 7*x^5 + 9*x^6 + 11*x^7 + 11*x^8 + ...
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
Programs
-
Mathematica
Table[2Floor[(2n+1)/3]+1,{n,0,70}] (* or *) LinearRecurrence[{1,0,1,-1},{1,3,3,5},70] (* Harvey P. Dale, Sep 17 2024 *)
-
PARI
{a(n) = (2*n + 1) \ 3 * 2 + 1};
-
Sage
def a(n) : return( len( CuspForms( Gamma0( 7), 2*n + 4, prec=1). basis()));
Formula
G.f.: (1 + 2*x + x^3) / (1 - x - x^3 + x^4).
a(-n) = - A168056(n - 1).
a(n) = - A168053(n + 2).
a(n+3) = a(n) + 4.
a(n) = (12*n+9+4*sqrt(3)*sin(2*n*Pi/3))/9. - Wesley Ivan Hurt, Sep 29 2017
Comments