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!)
A227363 a(n) = n + (n-1)*(n-2) + (n-3)*(n-4)*(n-5) + (n-6)*(n-7)*(n-8)*(n-9) + ... + ...*(n-n). 6

%I #25 May 04 2021 08:48:10

%S 0,1,2,5,10,17,32,61,110,185,316,557,986,1705,2840,4661,7702,12881,

%T 21620,35965,58706,94217,150016,239045,382670,614401,984332,1564301,

%U 2458810,3826745,5918936,9136597,14115686,21842225,33803620,52181021,80128082,122221801,185211440

%N a(n) = n + (n-1)*(n-2) + (n-3)*(n-4)*(n-5) + (n-6)*(n-7)*(n-8)*(n-9) + ... + ...*(n-n).

%C From a question by _Jonathan Vos Post_ dated Jul 09 2013, the indices of a(n) which are prime begin: 2, 3, 5, 7, 11, 41, 111, 205, 211, 215, 341, 345, 395, 581, 585, 1221, ..., . - _Robert G. Wilson v_, Jul 10 2013

%H Charles R Greathouse IV, <a href="/A227363/b227363.txt">Table of n, a(n) for n = 0..1000</a>

%e a(2) = 2 + 1*0 = 2.

%e a(3) = 3 + 2*1 = 5.

%e a(9) = 9 + 8*7 + 6*5*4 + 3*2*1*0 = 9 + 56 + 120 = 185.

%e a(11) = 11 + 10*9 + 8*7*6 + 5*4*3*2 = 557.

%e a(18) = 18 + 17*16 + 15*14*13 + 12*11*10*9 + 8*7*6*5*4 = 21620.

%t f[n_] := Sum[ Product[ n - k (k - 1)/2 - i + 1, {i, k}], {k, Sqrt[ 2n]}]; Array[f, 39, 0] (* _Robert G. Wilson v_, Jul 10 2013 *)

%o (Python)

%o for n in range(55):

%o sum = i = 0

%o k = 1

%o while i<=n:

%o product = 1

%o for x in range(k):

%o product *= n-i

%o i += 1

%o if i>n: break

%o sum += product

%o k += 1

%o print(str(sum), end=',')

%o (PARI) a(n)=sum(k=1,sqrtint(2*n)+1,prod(i=1,k,max(n-k*(k-1)/2-i+1,0))) \\ _Charles R Greathouse IV_, Jul 09 2013

%Y Cf. A227364, A227365, A227366, A227367.

%K nonn

%O 0,3

%A _Alex Ratushnyak_, Jul 07 2013

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 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)