A026476 For n>3, a(n) = 7*n - 21 + 2*(-1)^n.
1, 3, 4, 9, 12, 23, 26, 37, 40, 51, 54, 65, 68, 79, 82, 93, 96, 107, 110, 121, 124, 135, 138, 149, 152, 163, 166, 177, 180, 191, 194, 205, 208, 219, 222, 233, 236, 247, 250, 261, 264, 275, 278, 289, 292, 303, 306, 317, 320, 331, 334, 345, 348, 359, 362, 373, 376
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Yaohui Zhu, Kaiming Sun, Zhengdong Luo, and Lingfeng Wang, Progressive Self-Learning for Domain Adaptation on Symbolic Regression of Integer Sequences, Proc. 39th AAAI Conf. Artif. Intel. (2025) Vol. 39, No. 1, 1692-1699. See p. 1698.
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Programs
-
Magma
[1,3,4] cat [7*n - 21 + 2*(-1)^n: n in [4..60]]; // Vincenzo Librandi, Oct 18 2013
-
Mathematica
CoefficientList[Series[(1 + 2 x + 3 x^3 + 2 x^4 + 6 x^5)/((1 - x)^2 (1 + x)), {x, 0, 60}], x] (* Vincenzo Librandi, Oct 18 2013 *)
-
PARI
a(n) = if(n>3, 7*n - 21 + 2*(-1)^n, [1,3,4][n]) \\ Charles R Greathouse IV, Nov 21 2016
Formula
a(n) = a(n-1)+a(n-2)-a(n-3) for n>6. G.f.: x*(1+2*x+3*x^3+2*x^4+6*x^5)/((1-x)^2*(1+x)). - Colin Barker, May 02 2012
Extensions
More terms from David Duran (dduran(AT)ashland.edu), Dec 14 2005
Comments