The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A031973 a(n) = Sum_{k=0..n} n^k. 9
 1, 2, 7, 40, 341, 3906, 55987, 960800, 19173961, 435848050, 11111111111, 313842837672, 9726655034461, 328114698808274, 11966776581370171, 469172025408063616, 19676527011956855057, 878942778254232811938, 41660902667961039785743, 2088331858752553232964200 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS These are the generalized repunits of length n+1 in base n for all n >= 1: a(n) expressed in base n is 111...111 (n+1 1's): a(1) = 1^0 + 1^1 = 2 = A000042(2), a(2) = 2^0 + 2^1 + 2^2 = 7 = A000225(3), a(3) = 3^0 + 3^1 + 3^2 + 3^3 = 40 = A003462(4), etc., a(10) = 10^0 + 10^1 + 10^2 + ... + 10^9 + 10^10 = 11111111111 = A002275(11), etc. - Rick L. Shepherd, Aug 26 2004 a(n)=the total number of ordered selections of up to n objects from n types with repetitions allowed.  Thus for 2 objects a,b there are 7 possible selections: aa,bb,ab,ba,a,b, and the null set. - J. M. Bergot, Mar 26 2014 a(n)=the total number of ordered arrangements of 0,1,2..n objects, with repetitions allowed, selected from n types of objects. - J. M. Bergot, Apr 11 2014 LINKS Nathaniel Johnston, Table of n, a(n) for n = 0..100 FORMULA a(n) = (n^(n+1)-1)/(n-1) = (A007778(n)-1)/(n-1) = A023037(n)+A000312(n) = A031972(n)+1. - Henry Bottomley, Apr 04 2003 a(n) = A125118(n,n-2) for n>2. - Reinhard Zumkeller, Nov 21 2006 a(n) = [x^n] 1/((1 - x)*(1 - n*x)). - Ilya Gutkovskiy, Oct 04 2017 EXAMPLE a(3) = 3^0 + 3^1 + 3^2 + 3^3 = 40. MAPLE a:= proc(n) local c, i; c:=1; for i to n do c:= c*n+1 od; c end: seq(a(n), n=0..20); # Alois P. Heinz, Aug 15 2013 MATHEMATICA Join[{1}, Table[Total[n^Range[0, n]], {n, 20}]] (* Harvey P. Dale, Nov 13 2011 *) PROG (Sage) [lucas_number1(n, n, n-1) for n in range(1, 19)] # Zerinvary Lajos, May 16 2009 (MAGMA) [&+[n^k: k in [0..n]]: n in [0..30]]; // Vincenzo Librandi, Apr 18 2011 (PARI) a(n)=(n^(n+1)-1)/(n-1) \\ Charles R Greathouse IV, Mar 26 2014 CROSSREFS Cf. A000042 (unary representations), A000225 (2^n-1: binary repunits shown in decimal), A003462 ((3^n-1)/2: ternary repunits shown in decimal), A002275 ((10^n-1)/9: decimal repunits). Sequence in context: A105625 A135082 A102317 * A274279 A319945 A132785 Adjacent sequences:  A031970 A031971 A031972 * A031974 A031975 A031976 KEYWORD nonn,easy AUTHOR STATUS approved

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

Last modified April 7 19:49 EDT 2020. Contains 333306 sequences. (Running on oeis4.)