login
a(n) = n*(n^2+3*n-1)/3.
24

%I #61 Mar 06 2024 04:50:51

%S 0,1,6,17,36,65,106,161,232,321,430,561,716,897,1106,1345,1616,1921,

%T 2262,2641,3060,3521,4026,4577,5176,5825,6526,7281,8092,8961,9890,

%U 10881,11936,13057,14246,15505,16836,18241,19722,21281,22920,24641,26446,28337,30316

%N a(n) = n*(n^2+3*n-1)/3.

%C Row sums of triangle A131782 starting (1, 6, 17, 36, 65, 106, ...). - _Gary W. Adamson_, Jul 14 2007

%C a(n) is the number of triples (x,y,z) in {1,2,...,n}^3 with x <= y <= z or x >= y >= z. - Jack Kennedy, Mar 14 2009

%C a(2*n) is the difference between numbers of nonnegative multiples of 2*n+1 with even and odd digit sum in base 2*n in interval [0, 16*n^4). - _Vladimir Shevelev_, May 18 2012

%H Vincenzo Librandi, <a href="/A084990/b084990.txt">Table of n, a(n) for n = 0..1000</a>

%H S. Chaiken, C. R. H. Hanusa and T. Zaslavsky, <a href="http://www.math.binghamton.edu/zaslav/Tpapers/qqs3.pdf">A q-queens problem III. Partial queens</a>, arXiv:1402.4886 [math.CO], 2014-2018. See Conjecture 4.4.

%H Vladimir Shevelev, <a href="http://arxiv.org/abs/0710.3177">On monotonic strengthening of Newman-like phenomenon on (2m+1)-multiples in base 2m</a>, arXiv:0710.3177 [math.NT], 2007.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).

%F a(n) = 2*A000292(n-1) - 1 (notice offset=-1 in A000292!).

%F a(n) = (n-1)*(n+1)*(n+3)/3 + 1. - _Reinhard Zumkeller_, Aug 20 2007

%F a(n) = A077415(n+1) + 1 for n > 0; a(n) = A000290(n) + A007290(n); a(n+1) = Sum_{k=0..n} A028387(k). - _Reinhard Zumkeller_, Aug 20 2007

%F a(2*n) = Sum_{i=0..16*n^4, i==0 (mod 2*n+1)} (-1)^s_(2*n)(i), where s_k(n) is the digit sum of n in base k. - _Vladimir Shevelev_, May 18 2012

%F a(2*n) = (2/(2*n+1))*Sum_{i=1..n} tan^4(Pi*i/(2*n+1)). - _Vladimir Shevelev_, May 23 2012

%F a(n) = Sum_{i=1..n} i*(i+1)-1. - _Wesley Ivan Hurt_, Oct 19 2013

%F G.f.: x*(1+2*x-x^2)/(1-x)^4. - _Vincenzo Librandi_, Mar 28 2014

%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 3. - _Vincenzo Librandi_, Mar 28 2014

%F a(n) = A064043(n)/3. - _Alois P. Heinz_, Jul 21 2017

%F E.g.f.: x*exp(x)*(x^2 + 6*x + 3)/3. - _Stefano Spezia_, Mar 06 2024

%e Let n=2. Consider nonnegative multiples of 5 up to 16*2^4 - 1 = 255. There are 52 such numbers and from them only 8 (namely, 35, 50, 55, 115, 140, 200, 205, 220) have an odd digit sum in base 4. Therefore, a(4) = (52 - 8) - 8 = 36. - _Vladimir Shevelev_, May 18 2012

%p A084990:=n->n*(n^2+3*n-1)/3; seq(A084990(k),k=0..100); # _Wesley Ivan Hurt_, Oct 19 2013

%t Table[n*(n^2+3*n-1)/3,{n,0,100}] (* _Vladimir Joseph Stephan Orlovsky_, Mar 08 2010 *)

%t CoefficientList[Series[(x + 2 x^2 - x^3)/((1 - x)^4), {x, 0, 50}], x] (* _Vincenzo Librandi_, Mar 28 2014 *)

%t LinearRecurrence[{4,-6,4,-1},{0,1,6,17},50] (* _Harvey P. Dale_, Aug 18 2015 *)

%o (Magma) I:=[0,1,6,17]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // _Vincenzo Librandi_, Mar 28 2014

%o (PARI) a(n) = n*(n^2+3*n-1)/3 \\ _Charles R Greathouse IV_, Sep 24 2015

%Y Cf. A000290, A000292, A028387, A064043, A077415, A131782.

%K nonn,easy

%O 0,3

%A _Gary W. Adamson_, Jul 16 2003