OFFSET
1,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
FORMULA
a(n) = n/4 + O(n), asymptotically. [Perhaps O(n) should be o(n)? - N. J. A. Sloane, Mar 26 2019]
In fact we have a(n) = n/4 + O(log(n)). More precisely let c(n)=A037800(n) then we get a(8n)=2n+2+2c(n), a(8n+1)=2n+3+2c(n), a(8n+2)=2n+2+2c(n), a(8n+3)=2n+2+2c(n)+(-1)^n, a(8n+4)=2n+3+2c(n)+(-1)^n, a(8n+5)=2n+4+2c(n)+(-1)^n, a(8n+6)=2n+3+2c(n)+(-1)^n, a(8n+7)=2n+3+2c(n+1). - Benoit Cloitre, Mar 30 2019
MATHEMATICA
Table[Sum[KroneckerSymbol[j, j+1], {j, 1, n}], {n, 1, 80}] (* G. C. Greubel, Mar 17 2019 *)
PROG
(PARI) for(n=1, 100, print1(sum(i=1, n, kronecker(i, i+1)), ", "))
(Sage) [sum(kronecker_symbol(j, j+1) for j in (1..n)) for n in (1..80)] # G. C. Greubel, Mar 17 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Jun 14 2002
STATUS
approved