OFFSET
1,2
COMMENTS
Equivalently, numbers of the form m*(10*m+6)+1, where m=0,-1,1,-2,2,-3,3,...
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
MAPLE
A220082:=proc(q)
local n;
for n from 1 to q do if type(sqrt(10*n-1), integer) then print(n);
fi; od; end:
A220082(1000); # Paolo P. Lava, Feb 19 2013
MATHEMATICA
Select[Range[0, 6000], IntegerQ[Sqrt[10 # - 1]] &]
CoefficientList[Series[(1 + 4 x + 10 x^2 + 4 x^3 + x^4) / ((1 + x)^2 (1 - x)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 18 2013 *)
LinearRecurrence[{1, 2, -2, -1, 1}, {1, 5, 17, 29, 53}, 50] (* Harvey P. Dale, Nov 19 2023 *)
PROG
(Magma) [n: n in [1..6000] | IsSquare(10*n-1)]; /* or (see the first comment): */ [1] cat [m*(10*m+6)+1: m in [-n, n], n in [1..24]];
(Magma) I:=[1, 5, 17, 29, 53]; [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..60]]; // Vincenzo Librandi, Aug 18 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Dec 05 2012
STATUS
approved