OFFSET
1,2
COMMENTS
If 14k+1 is a perfect square..(0,12,16,52,60,120..) then the square root of 14k+1 = a(n) - Gary Detlefs, Feb 22 2010
More generally, these numbers are of the form (2*h*n+(h-4)*(-1)^n-h)/4 (h, n natural numbers), therefore ((2*h*n+(h-4)*(-1)^n-h)/4)^2-1==0 (mod h); in our case, a(n)^2-1==0 (mod 14). Also a(n)^2-1==0 (mod 28). - Bruno Berselli, Oct 26 2010 - Nov 17 2010
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) = 14*(n-1)-a(n-1), n>1. - R. J. Mathar, Jan 30 2010
From Bruno Berselli, Oct 26 2010: (Start)
a(n) = -a(-n+1) = (14*n+5*(-1)^n-7)/2.
G.f.: x*(1+12*x+x^2)/((1+x)*(1-x)^2).
a(n) = a(n-2)+14 for n>2.
a(n) = 14*A000217(n-1)+1 - 2*sum[i=1..n-1] a(i) for n>1. (End)
a(0)=1, a(1)=13, a(2)=15, a(n)=a(n-1)+a(n-2)-a(n-3). - Harvey P. Dale, May 11 2011
Sum_{n>=1} (-1)^(n+1)/a(n) = (Pi/14)*cot(Pi/14). - Amiram Eldar, Dec 04 2021
E.g.f.: 1 + ((14*x - 7)*exp(x) + 5*exp(-x))/2. - David Lovler, Sep 04 2022
From Amiram Eldar, Nov 25 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = 2*cos(Pi/14).
Product_{n>=2} (1 + (-1)^n/a(n)) = (Pi/14)*cosec(Pi/14). (End)
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {1, 13, 15}, 60] (* or *) Select[Range[500], MemberQ[{1, 13}, Mod[#, 14]]&] (* Harvey P. Dale, May 11 2011 *)
PROG
(Haskell)
a113801 n = a113801_list !! (n-1)
a113801_list = 1 : 13 : map (+ 14) a113801_list
-- Reinhard Zumkeller, Jan 07 2012
(PARI) a(n)=n\2*14-(-1)^n \\ Charles R Greathouse IV, Sep 15 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Giovanni Teofilatto, Jan 22 2006
EXTENSIONS
Corrected and extended by Giovanni Teofilatto, Nov 14 2008
Replaced the various formulas by a correct one - R. J. Mathar, Jan 30 2010
STATUS
approved