OFFSET
1,2
COMMENTS
Equivalently, numbers m such that 20*m+1 is a square.
Also, integer values of h*(h+1)/5.
More generally, for the numbers of the form n*(k*n+1) with n in A001057, we have:
. generating function (offset 1): x^2*(k-1+2*x+(k-1)*x^2)/((1+x)^2*(1-x)^3);
. n-th term: b(n) = (2*k*n*(n-1)+(k-2)*(-1)^n*(2*n-1)+k-2)/8;
. first differences: (n-1)*((-1)^n*(k-2)+k)/2;
. b(2n+1)-b(2n) = 2*n (independent from k);
. (4*k)*b(n)+1 = (2*k*n+(k-2)*(-1)^n-k)^2/4.
LINKS
Bruno Berselli, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
G.f.: 2*x^2*(2 + x + 2*x^2)/((1 + x)^2*(1 - x)^3).
a(n) = a(-n+1) = (10*n*(n-1) + 3*(-1)^n*(2*n - 1) + 3)/8.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). - Harvey P. Dale, Jan 21 2015
Sum_{n>=2} 1/a(n) = 5 - sqrt(1+2/sqrt(5))*Pi. - Amiram Eldar, Mar 15 2022
a(n) = A132356(n-1)/2, n >= 1. - Bernard Schott, Mar 15 2022
MATHEMATICA
Rest[Flatten[{# (5 # - 1), # (5 # + 1)} & /@ Range[0, 25]]]
CoefficientList[Series[2 x (2 + x + 2 x^2) / ((1 + x)^2 (1 - x)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 18 2013 *)
LinearRecurrence[{1, 2, -2, -1, 1}, {0, 4, 6, 18, 22}, 50] (* Harvey P. Dale, Jan 21 2015 *)
PROG
(Magma) k:=5; f:=func<n | n*(k*n+1)>; [0] cat [f(n*m): m in [-1, 1], n in [1..25]];
(Magma) I:=[0, 4, 6, 18, 22]; [n le 5 select I[n] else Self(n-1)+2*Self(n-2)-2*Self(n-3)-Self(n-4)+Self(n-5): n in [1..50]]; // Vincenzo Librandi, Aug 18 2013
CROSSREFS
Subsequence of A011858.
Cf. A090771: square roots of 20*a(n)+1 (see the first comment).
Cf. numbers of the form n*(k*n+1) with n in A001057: k=0, A001057; k=1, A110660; k=2, A000217; k=3, A152749; k=4, A074378; k=5, this sequence; k=6, A036498; k=7, A219191; k=8, A154260.
Cf. similar sequences listed in A219257.
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Nov 14 2012
STATUS
approved