|
Search: id:A008782
|
|
|
| A008782 |
|
For any circular arrangement of 0..n-1, let S = sum of squares of every sum of three contiguous numbers; then a(n) = # of distinct values of S. |
|
+0 2
|
| |
|
|
OFFSET
|
1,5
|
|
|
MAPLE
|
A008782 := proc(n) local S, i, j, sumsq, npermut, p, per ; S := {} ; npermut := combinat[permute]([seq(i, i=0..n-1)]) ; for p from 1 to nops(npermut) do per := op(p, npermut) ; sumsq := 0 ; for i from 0 to n-1 do sumsq := sumsq + (add(op(1+(j mod n), per), j=i..i+2)) ^2 ; od ; S := S union {sumsq} ; od ; RETURN(nops(S)) ; end: for n from 1 to 20 do print(A008782(n)) ; od : - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Jun 18 2007
|
|
CROSSREFS
|
Cf. A007773.
Sequence in context: A041124 A048695 A111325 this_sequence A097058 A134790 A097405
Adjacent sequences: A008779 A008780 A008781 this_sequence A008783 A008784 A008785
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
Olivier Gerard (ogerard(AT)ext.jussieu.fr)
|
|
EXTENSIONS
|
More terms from Reiner Martin (reinermartin(AT)hotmail.com), May 19 2001
|
|
|
Search completed in 0.002 seconds
|