OFFSET
0,2
COMMENTS
Sequence found by reading the line from 1, in the direction 1, 6,..., and the same line from 1, in the direction 1, 18,..., in the square spiral whose edges have length A195013 and whose vertices are the numbers A195014. Line perpendicular to the main axis A195015 in the same spiral. - Omar E. Pol, Oct 14 2011
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n) = n*(5*n+7)/2 + 1 - n mod 2.
a(n) = Sum_{k=1..n+1} A153125(n+1,k).
a(n) = A000566(n+1) - n mod 2.
From Colin Barker, Jul 07 2012: (Start)
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
G.f.: (1+4*x+6*x^2-x^3)/((1-x)^3*(1+x)). (End)
Sum_{n>=0} 1/a(n) = 5/7 + 2*sqrt(1+2/sqrt(5))*Pi/21 + 2*sqrt(5)*log(phi)/21 + 5*log(5)/21 - 8*log(2)/21, where phi is the golden ratio (A001622). - Amiram Eldar, Aug 23 2022
MATHEMATICA
LinearRecurrence[{2, 0, -2, 1}, {1, 6, 18, 33}, 50] (* Harvey P. Dale, Apr 13 2014 *)
PROG
(PARI) a(n)=n*(5*n+7)/2 + 1 - n%2 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Dec 20 2008
STATUS
approved