A347365 a(n) = n * (2-(-1)^n), or zero together with first differences of even triangular numbers halved (A074378).
0, 3, 2, 9, 4, 15, 6, 21, 8, 27, 10, 33, 12, 39, 14, 45, 16, 51, 18, 57, 20, 63, 22, 69, 24, 75, 26, 81, 28, 87, 30, 93, 32, 99, 34, 105, 36, 111, 38, 117, 40, 123, 42, 129, 44, 135, 46, 141, 48, 147, 50, 153, 52, 159, 54, 165, 56, 171, 58, 177, 60, 183, 62, 189, 64
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
Crossrefs
Programs
-
Mathematica
Table[n(2-(-1)^n),{n,0,99}] (* or *) LinearRecurrence[{0,2,0,-1}, {0,3,2,9}, 100] (* or *) If[EvenQ@#,#,3#]&/@Range[0,99] (* or *) Drop[Flatten@Transpose[{2#,6#+3}&@Range[0,Quotient[#,2]]],-Boole@EvenQ@#]&@(10^2)
-
PARI
a(n) = n*(2-(-1)^n); \\ Michel Marcus, Sep 13 2021
-
Sage
(x*(3+2*x+3*x^2)/(1-x^2)^2).series(x,65).coefficients(x,sparse=False) # Stefano Spezia, Aug 30 2021
Formula
G.f.: x*(3 + 2*x + 3*x^2)/(1 - x^2)^2.
E.g.f.: x*(3*cosh(x) + sinh(x)).
Dirichlet g.f.: 2^(-s) * (3*2^s - 4) * zeta(s-1) = (3 - 4/2^s) * zeta(s-1) = (3 - 1/2^(s-2)) * zeta(s-1).
a(n) = n*(2-(-1)^n) = 3*n / (2+(-1)^n).
a(n) = 3*n if n odd, a(n) = n if n even, implies a(a(2n)) = 2n, a(a(2n+1)) = 9*a(2n+1).
a(n) = 3*b(n), if n odd and a(n) = b(n)/3, if n even, with b(n) = A165998(n).
a(n) = a(a(2k*n)/(2k)) = a((2k+1)*n) / (2k+1), since a(2*k*n) / (2*k) = n.
a(n) = 4*n - A165998(n).
a(n+1) = a(n) + A086970(n+1)*(-1)^n.
a(n) = n*A010684(n). - Michel Marcus, Sep 13 2021
For positive integers k and n, a(n) = A(n,1) = n * (A(n,k)/n)^(1/k), where the k-th nesting composition A(n,k) = a(a(...a(a(n))...)) = n * ( a(n) / n )^k, and d.g.f. of A(n,k) = (2^(1-s) + (1-2^(1-s))*3^k) * zeta(s-1). - Federico Provvedi, Sep 18 2021
a(n+1) = A165998(n)*(1 + 1/n). - Federico Provvedi, Sep 19 2021
Comments