OFFSET
1,1
COMMENTS
Numbers divisible by 2 but not by 3 or 4. - Robert Israel, Apr 24 2015
For n > 1, a(n) is representable as a sum of four but no fewer consecutive nonnegative integers, i.e., 10 = 1 + 2 + 3 + 4, 14 = 2 + 3 + 4 + 5, 22 = 4 + 5 + 6 + 7, etc. (see A138591). - Martin Renner, Mar 14 2016
Essentially the same as A063221. - Omar E. Pol, Aug 16 2023
LINKS
David Lovler, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = 2*A007310(n).
a(n) = 12*(n-1) - a(n-1), with a(1)=2. - Vincenzo Librandi, Nov 16 2010
G.f.: 2*x*(1+4*x+x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
a(n) = a(n-1) + a(n-2) - a(n-3); a(1)=2, a(2)=10, a(3)=14. - Harvey P. Dale, Jun 24 2013
a(n) = 6*n - 3 + (-1)^n. - Wesley Ivan Hurt, Apr 23 2015
E.g.f.: 2 + (6*x - 2)*cosh(x) + 2*(3*x - 2)*sinh(x). - Stefano Spezia, May 09 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(4*sqrt(3)). - Amiram Eldar, Dec 13 2021
E.g.f.: 2 + (6*x - 3)*exp(x) + exp(-x). - David Lovler, Aug 08 2022
a(n) = A063221(n), n > 1. - Omar E. Pol, Aug 15 2023
From Amiram Eldar, Nov 24 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = sqrt(2) (A002193).
Product_{n>=1} (1 + (-1)^n/a(n)) = 2*sin(Pi/12) (A101263). (End)
MAPLE
MATHEMATICA
Flatten[#+{2, 10}&/@(12*Range[0, 30])] (* or *) LinearRecurrence[{1, 1, -1}, {2, 10, 14}, 60] (* Harvey P. Dale, Jun 24 2013 *)
PROG
(Haskell)
a091999 n = a091999_list !! (n-1)
a091999_list = 2 : 10 : map (+ 12) a091999_list
-- Reinhard Zumkeller, Jan 21 2013
(Magma) [6*n-3+(-1)^n : n in [1..100]]; // Wesley Ivan Hurt, Apr 23 2015
(PARI) a(n) = 6*n - 3 + (-1)^n \\ David Lovler, Jul 16 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ray Chandler, Feb 21 2004
STATUS
approved