A328984 If n is even, a(n) = floor((5t+1)/2) where t=n/2; if n == 1 (mod 4) then a(n) = 10t+1 where t = (n-1)/4; and if n == 3 (mod 4) then a(n) = 10t+7 where t = (n-3)/4.
1, 3, 7, 5, 11, 8, 17, 10, 21, 13, 27, 15, 31, 18, 37, 20, 41, 23, 47, 25, 51, 28, 57, 30, 61, 33, 67, 35, 71, 38, 77, 40, 81, 43, 87, 45, 91, 48, 97, 50, 101, 53, 107, 55, 111, 58, 117, 60, 121, 63, 127, 65, 131, 68, 137, 70, 141, 73, 147, 75, 151, 78
Offset: 1
Links
- N. J. A. Sloane, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (0,1,0,1,0,-1).
Programs
-
Mathematica
Table[Which[EvenQ[n],Floor[(5 n/2+1)/2],Mod[n,4]==1,10 (n-1)/4+1,True,10 (n-3)/4+7],{n,70}]
Formula
From Colin Barker, Nov 07 2019: (Start)
G.f.: x*(1 + 3*x + 6*x^2 + 2*x^3 + 3*x^4) / ((1 - x^2)*(1 - x^4)).
a(n) = a(n-2) + a(n-4) - a(n-6) for n > 6.
(End)
Comments