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!)
A031973 a(n) = Sum_{k=0..n} n^k. 16

%I #70 Sep 08 2022 08:44:50

%S 1,2,7,40,341,3906,55987,960800,19173961,435848050,11111111111,

%T 313842837672,9726655034461,328114698808274,11966776581370171,

%U 469172025408063616,19676527011956855057,878942778254232811938,41660902667961039785743,2088331858752553232964200

%N a(n) = Sum_{k=0..n} n^k.

%C 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

%C 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

%C 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

%H Nathaniel Johnston, <a href="/A031973/b031973.txt">Table of n, a(n) for n = 0..100</a>

%F 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

%F a(n) = A125118(n,n-2) for n>2. - _Reinhard Zumkeller_, Nov 21 2006

%F a(n) = [x^n] 1/((1 - x)*(1 - n*x)). - _Ilya Gutkovskiy_, Oct 04 2017

%F a(n) = A104878(2n,n). - _Alois P. Heinz_, May 04 2021

%e a(3) = 3^0 + 3^1 + 3^2 + 3^3 = 40.

%p a:= proc(n) local c, i; c:=1; for i to n do c:= c*n+1 od; c end:

%p seq(a(n), n=0..20); # _Alois P. Heinz_, Aug 15 2013

%t Join[{1},Table[Total[n^Range[0,n]],{n,20}]] (* _Harvey P. Dale_, Nov 13 2011 *)

%o (Sage) [lucas_number1(n,n,n-1) for n in range(1, 19)] # _Zerinvary Lajos_, May 16 2009

%o (Magma) [&+[n^k: k in [0..n]]: n in [0..30]]; // _Vincenzo Librandi_, Apr 18 2011

%o (PARI) a(n)=(n^(n+1)-1)/(n-1) \\ _Charles R Greathouse IV_, Mar 26 2014

%Y 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).

%Y Cf. A104878.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_

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 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)