OFFSET
0,6
COMMENTS
Complementary to A130482 with respect to triangular numbers, in that A130482(n) + 4*a(n) = n(n+1)/2 = A000217(n).
Disregarding the first three 0's the resulting sequence a'(n) is the sum of the positive integers <= n that have the same residue modulo 4 as n. This is the additive counterpart of the quadruple factorial numbers. - Peter Luschny, Jul 06 2011
From Heinrich Ludwig, Dec 23 2017: (Start)
Column sums of (shift of rows = 4):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
1 2 3 4 5 6 7 8 9 10 ...
1 2 3 4 5 6 ...
1 2 ...
.......................................
---------------------------------------
1 2 3 4 6 8 10 12 15 18 21 24 28 32 ...
shift of rows = 1 see A000217
shift of rows = 2 see A002620
shift of rows = 3 see A001840
shift of rows = 5 see A130520
(End)
Conjecture: a(n+2) is the maximum effective weight of a numerical semigroup S of genus n (see Nathan Pflueger). - Stefano Spezia, Jan 04 2019
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Bakir Farhi, On the Representation of the Natural Numbers as the Sum of Three Terms of the Sequence floor(n^2/a), Journal of Integer Sequences, Vol. 16 (2013), Article 13.6.4.
Darren Glass and Joshua Wagner, Arithmetical Structures on Paths With a Doubled Edge, arXiv:1903.01398 [math.CO], 2019.
Nathan Pflueger, On non-primitive Weierstrass points, Alg. Number Th. 12 (2018) 1923-1947 and arXiv:1608.0566 [math.AG], 2016.
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,1,-2,1).
FORMULA
G.f.: x^4/((1-x^4)*(1-x)^2) = x^4/((1+x)*(1+x^2)*(1-x)^3).
a(n) = +2*a(n-1) -1*a(n-2) +1*a(n-4) -2*a(n-5) +1*a(n-6).
a(n) = floor((n-1)^2/8). - Mitch Harris, Sep 08 2008
a(n) = round(n*(n-2)/8) = round((n^2-2*n-1)/8) = ceiling((n+1)*(n-3)/8). - Mircea Merca, Nov 28 2010
a(n) = A001972(n-4), n>3. - Franklin T. Adams-Watters, Jul 10 2009
a(n) = a(n-4)+n-3, n>3. - Mircea Merca, Nov 28 2010
Euler transform of length 4 sequence [ 2, 0, 0, 1]. - Michael Somos, Oct 14 2011
a(n) = a(2-n) for all n in Z. - Michael Somos, Oct 14 2011
a(n) = A214734(n, 1, 4). - Renzo Benedetti, Aug 27 2012
a(4n) = A000384(n), a(4n+1) = A001105(n), a(4n+2) = A014105(n), a(4n+3) = A046092(n). - Philippe Deléham, Mar 26 2013
a(n) = Sum_{i=1..ceiling(n/2)-1} (i mod 2) * (n - 2*i - 1). - Wesley Ivan Hurt, Jan 23 2014
a(n) = ( 2*n^2-4*n-1+(-1)^n+2*((-1)^((2*n-1+(-1)^n)/4)-(-1)^((6*n-1+(-1)^n)/4)) )/16 = ( 2*n*(n-2) - (1-(-1)^n)*(1-2*i^(n*(n-1))) )/16, where i=sqrt(-1). - Luce ETIENNE, Aug 29 2014
E.g.f.: (1/8)*((- 1 + x)*x*cosh(x) + 2*sin(x) + (- 1 - x + x^2)*sinh(x)). - Stefano Spezia, Jan 15 2019
Sum_{n>=4} 1/a(n) = Pi^2/12 + 5/2. - Amiram Eldar, Aug 13 2022
EXAMPLE
G.f. = x^4 + 2*x^5 + 3*x^6 + 4*x^7 + 6*x^8 + 8*x^9 + 10*x^10 + 12*x^11 + ...
[ n] a(n)
---------
[ 4] 1
[ 5] 2
[ 6] 3
[ 7] 4
[ 8] 1 + 5
[ 9] 2 + 6
[10] 3 + 7
[11] 4 + 8
MAPLE
quadsum := n -> add(k, k = select(k -> k mod 4 = n mod 4, [$1 .. n])):
MATHEMATICA
a[ n_] := Quotient[ (n - 1)^2, 8]; (* Michael Somos, Oct 14 2011 *)
PROG
(PARI) {a(n) = (n - 1)^2 \ 8}; /* Michael Somos, Oct 14 2011 */
(Magma) [Round(n*(n-2)/8): n in [0..70]]; // Vincenzo Librandi, Jun 25 2011
(Maxima) makelist(floor((n-1)^2/8), n, 0, 70); /* Stefano Spezia, Jan 04 2019 */
(GAP) a:=List([0..65], n->Sum([0..n], k->Int(k/4)));; Print(a); # Muniru A Asiru, Jan 04 2019
(Python)
def A130519(n): return (n-1)**2>>3 # Chai Wah Wu, Jul 30 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, Jun 01 2007
EXTENSIONS
Partially edited by R. J. Mathar, Jul 11 2009
STATUS
approved