OFFSET
1,2
COMMENTS
X values of solutions to the equation 6*X^3 + X^2 = Y^2. - Mohamed Bouhamida, Nov 06 2007
Arithmetic averages of the k triangular numbers 0, 1, 3, 6, ..., (k-1)*k/2 that take integer values. - Vladimir Joseph Stephan Orlovsky, Aug 05 2009 [edited by Jon E. Schoenfield, Jan 10 2015]
Even terms in A186423; union of A033579 and A033580, A010052(6*a(n)+1) = 1. - Reinhard Zumkeller, Feb 21 2011
a(n) are integers produced by Sum_{i = 1..k-1} i*(k-i)/k, for some k > 0. Values for k are given by A007310 = sqrt(6*a(n)+1), the square roots of those perfect squares. - Richard R. Forberg, Feb 16 2015
Equivalently, numbers of the form 2*h*(3*h+1), where h = 0, -1, 1, -2, 2, -3, 3, -4, 4, ... (see also the sixth comment of A152749). - Bruno Berselli, Feb 02 2017
LINKS
Harry J. Smith, 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.: 4*x^2*(1 + x + x^2) / ( (1+x)^2*(1-x)^3 ).
a(2*k) = k*(6*k+2), a(2*k+1) = 6*k^2 + 10*k + 4. - Mohamed Bouhamida, Nov 06 2007
a(n) = n^2 - n + 2*ceiling((n-1)/2)^2. - Gary Detlefs, Feb 23 2010
From Bruno Berselli, Nov 28 2010: (Start)
a(n) = (6*n*(n-1) + (2*n-1)*(-1)^n + 1)/4.
6*a(n) + 1 = A007310(n)^2. (End)
E.g.f.: (3*x^2*exp(x) - x*exp(-x) + sinh(x))/2. - Ilya Gutkovskiy, Jun 18 2016
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). - Wesley Ivan Hurt, Apr 21 2021
From Amiram Eldar, Mar 11 2022: (Start)
Sum_{n>=2} 1/a(n) = (9-sqrt(3)*Pi)/6.
Sum_{n>=2} (-1)^n/a(n) = 3*(log(3)-1)/2. (End)
MAPLE
seq(n^2+n+2*ceil(n/2)^2, n=0..48); # Gary Detlefs, Feb 23 2010
MATHEMATICA
Select[Range[0, 3999], IntegerQ[Sqrt[6# + 1]] &] (* Harvey P. Dale, Mar 10 2013 *)
PROG
(PARI) je=[]; for(n=0, 7000, if(issquare(6*n+1), je=concat(je, n))); je
(PARI) { n=0; for (m=0, 10^9, if (issquare(6*m + 1), write("b062717.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 09 2009
(Magma) [(6*n*(n-1) + (2*n-1)*(-1)^n + 1)/4: n in [1..70]]; // Wesley Ivan Hurt, Apr 21 2021
(Python)
def A062717(n): return (n*(3*n + 4) + 1 if n&1 else n*(3*n + 2))>>1 # Chai Wah Wu, Jan 31 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jason Earls, Jul 14 2001
STATUS
approved