OFFSET
1,2
COMMENTS
First differences are 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, ..., . - Robert G. Wilson v, May 31 2017
Numbers that are congruent to {0, 3, 8, 11} mod 12. - Amiram Eldar, Jul 26 2024
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..5000
Robert Phillips, Triangular numbers which are sums of two triangular numbers, 2006.
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1).
FORMULA
From R. J. Mathar, Jan 07 2009: (Start)
G.f.: x*(3 + 2*x + x^2)/((1 + x^2)*(1 - x)^2). (End)
a(n) = 3*n - 2 - (-1)^((2*n-3-(-1)^n)/4). - Luce ETIENNE, Apr 04 2015
Sum_{n>=2} 1/a(n) = log(2)/2 + arccoth(sqrt(3))/(2*sqrt(3)) - Pi*(3+2*sqrt(3))/72. - Amiram Eldar, Jul 26 2024
MAPLE
a:= proc(n) if is(n*(n+1)/12, integer) then n fi end: seq(a(n), n=0..200); # Emeric Deutsch, Jun 25 2005
MATHEMATICA
Select[ Range[0, 182], Mod[ #(# + 1), 12] == 0 &] (* Robert G. Wilson v, Jun 25 2005 *)
LinearRecurrence[{2, -2, 2, -1}, {0, 3, 8, 11}, 200] (* Vincenzo Librandi, Jun 04 2017 *)
PROG
(Magma) [3*n-2-(-1)^((2*n-3-(-1)^n) div 4): n in [1..80]]; // Vincenzo Librandi, May 04 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert Phillips (bobp(AT)usca.edu), Jun 23 2005
EXTENSIONS
More terms from Robert G. Wilson v and Emeric Deutsch, Jun 25 2005
STATUS
approved