OFFSET
1,2
COMMENTS
Cf. property described by Gary Detlefs in A113801: more generally, these numbers are of the form (2*h*n + (h-4)*(-1)^n-h)/4 (h and n in A000027), then ((2*h*n + (h-4)*(-1)^n - h)/4)^2 - 1 == 0 (mod h); in our case, a(n)^2 - 1 == 0 (mod 12). Also a(n)^2 - 1 == 0 (mod 24).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = 12*n - a(n-1) - 12 (with a(1)=1). - Vincenzo Librandi, Nov 16 2010
a(n) = 6*n + 2*(-1)^n - 3.
G.f.: x*(1+10*x+x^2)/((1+x)*(1-x)^2).
a(n) - a(n-1) - a(n-2) + a(n-3) = 0 for n > 3.
a(n) = a(n-2) + 12 for n > 2.
a(n) = 12*A000217(n-1) + 1 - 2*Sum_{i=1..n-1} a(i) for n > 1.
Sum_{n>=1} (-1)^(n+1)/a(n) = (2 + sqrt(3))*Pi/12. - Amiram Eldar, Dec 04 2021
E.g.f.: 1 + (6*x - 3)*exp(x) + 2*exp(-x). - David Lovler, Sep 04 2022
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {1, 11, 13}, 100] (* Harvey P. Dale, Jul 26 2017 *)
PROG
(Magma) [ n: n in [1..350] | n mod 12 eq 1 or n mod 12 eq 11 ];
(Haskell)
a091998 n = a091998_list !! (n-1)
a091998_list = 1 : 11 : map (+ 12) a091998_list
-- Reinhard Zumkeller, Jan 07 2012
(PARI) is(n)=n=n%12; n==11 || n==1 \\ Charles R Greathouse IV, Jul 02 2013
CROSSREFS
First row of A092260.
KEYWORD
nonn,easy
AUTHOR
Ray Chandler, Feb 21 2004
EXTENSIONS
Formulae and comment added by Bruno Berselli, Nov 17 2010 - Nov 18 2010
STATUS
approved