OFFSET
0,3
COMMENTS
Smallest of n consecutive odd numbers whose sum is n^4. (n^k can be expressed as the sum of n consecutive odd numbers the smallest of which is given by n^(k-1)-n+1.)
REFERENCES
T. A. Gulliver, Sequences from Cubes of Integers, Int. Math. Journal, 4 (2003), 439-445.
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..1000
Leo Tavares, Illustration: Diamond Chains
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: (1-3*x+9*x^2-x^3)/(1 - x)^4. a(-n) = -A126420(n). - Bruno Berselli, Aug 29 2011
a(n) = 1 + Sum_{k=1..n} 3*(k-1)*k. - Luce ETIENNE and Michel Marcus, Nov 01 2014
E.g.f.: exp(x)*(1 + 3*x^2 + x^3). - Nikolaos Pantelidis, Feb 13 2023
EXAMPLE
a(5) = 121 = 5^3 - 5 + 1. We have 121 + 123 + 125 + 127 + 129 = 625 = 5^4.
MATHEMATICA
Table[n^3 - n + 1, {n, 0, 40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2012 *)
LinearRecurrence[{4, -6, 4, -1}, {1, 1, 7, 25}, 50] (* Harvey P. Dale, Aug 17 2020 *)
PROG
(PARI) a(n) = n^3 - n + 1; \\ Harry J. Smith, Jul 25 2009
(Magma) [n^3 - n + 1: n in [0..40]]; // Vincenzo Librandi, Aug 29 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, May 19 2001
EXTENSIONS
Offset changed from 1 to 0 by Harry J. Smith, Jul 25 2009
STATUS
approved