OFFSET
1,2
COMMENTS
Also numbers n such that (ceiling(sqrt(n*(n+1)/2)))^2 - n*(n+1)/2 = 3. - Ctibor O. Zizka, Nov 10 2009
Note that 3 is 2nd triangular number A000217(2) = 2(2+1)/2, hence 2nd and n-th triangular numbers sum up to a square. - Zak Seidov, Oct 16 2015
LINKS
F. T. Adams-Watters, SeqFan Discussion, Oct 2009
FORMULA
{k: 3+k*(k+1)/2 in A000290}.
Conjectures:
a(n) = +a(n-1) +6*a(n-2) -6*a(n-3) -a(n-4) +a(n-5);
G.f.: x*(1 + 2*x + 3*x^2 - 2*x^3 - 2*x^4)/((1-x)*(x^2-2*x-1)*(x^2+2*x-1)). [Comment from Zak Seidov, Oct 21 2009: I believe both of these conjectures are correct.]
a(1..4)=(1,3,12,22); a(n>4)=6*a(n-2)-a(n-4)+2. [Zak Seidov, Oct 21 2009]
EXAMPLE
1*(1+1)/2+3 = 2^2. 3*(3+1)/2+3 = 3^2. 12*(12+1)/2+3 = 9^2. 22*(22+1)/2+3 = 16^2.
MATHEMATICA
a[1]=1; a[2]=3; a[3]=12; a[4]=22; a[n_]:=a[n]=6*a[n-2]-a[n-4]+2; Table[a[n], {n, 35}] (* Zak Seidov, Oct 21 2009 *)
Select[Range[100], ( Ceiling[Sqrt[#*(# + 1)/2]] )^2 - #*(# + 1)/2 == 3 &] (* G. C. Greubel, Sep 02 2016 *)
Select[Range[0, 2 10^7], IntegerQ[Sqrt[3 + # (# + 1) / 2]] &] (* Vincenzo Librandi, Sep 03 2016 *)
PROG
(PARI) for(n=0, 1e10, if(issquare(3+n*(n+1)/2), print1(n", "))) \\ Altug Alkan, Oct 16 2015
(Magma) [n: n in [0..2*10^7] | IsSquare(3+n*(n+1)/2)]; // Vincenzo Librandi, Sep 03 2016
(Magma) [1] cat [n: n in [0..2*10^7] | (Ceiling(Sqrt(n*(n+1)/2)))^2-n*(n+1)/2 eq 3]; // Vincenzo Librandi, Sep 03 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
R. J. Mathar, Oct 18 2009
EXTENSIONS
More terms from Zak Seidov, Oct 21 2009
STATUS
approved