login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A094260 Sum of next n numbers/n if n divides the sum else n times the sum of next n numbers. 0
1, 10, 5, 136, 13, 666, 25, 2080, 41, 5050, 61, 10440, 85, 19306, 113, 32896, 145, 52650, 181, 80200, 221, 117370, 265, 166176, 313, 228826, 365, 307720, 421, 405450, 481, 524800, 545, 668746, 613, 840456, 685, 1043290, 761, 1280800, 841, 1556730, 925, 1875016, 1013, 2239786 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Quasipolynomial of order 2 and degree 5. - Charles R Greathouse IV, Oct 14 2013
LINKS
FORMULA
For even n, a(n) = A000217(n^2) = n^2*(n^2+1)/2; for odd n, a(n) = (n^2 + 1)/2.
Sum_{n>=1} 1/a(n) = 1 + Pi^2/12 - Pi*cosech(Pi). - Amiram Eldar, Aug 23 2022
EXAMPLE
The sequence is: 1/1, (2+3)*2, (4+5+6)/3, (7+8+9+10)*4, ...
MATHEMATICA
LinearRecurrence[{0, 5, 0, -10, 0, 10, 0, -5, 0, 1}, {1, 10, 5, 136, 13, 666, 25, 2080, 41, 5050}, 50] (* Harvey P. Dale, May 01 2020 *)
fix[c_]:=If[Mod[Total[c], Length[c]]==0, Total[c]/Length[c], Length[c] Total[c]]; fix/@With[ {nn=50}, TakeList[ Range[(nn(nn+1))/2], Range[nn]]] (* Harvey P. Dale, Apr 05 2023 *)
PROG
(PARI) a(n) = if (n%2, (n^2+1)/2, n^2*(n^2+1)/2); \\ Michel Marcus, Aug 23 2022
CROSSREFS
Sequence in context: A096898 A146008 A038307 * A239603 A241439 A276348
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Apr 26 2004
EXTENSIONS
Edited and extended by Max Alekseyev, Apr 26 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 27 18:09 EDT 2024. Contains 372020 sequences. (Running on oeis4.)