login
a(n) = floor( Product_{k>=0} (1 + n/k!) ).
2

%I #15 Apr 07 2016 13:24:26

%S 1,7,26,69,151,293,519,862,1361,2062,3019,4297,5969,8121,10848,14261,

%T 18481,23646,29908,37437,46419,57061,69586,84242,101297,121042,143793,

%U 169893,199710,233642,272117,315592,364560,419545,481109,549849,626403,711448,805703

%N a(n) = floor( Product_{k>=0} (1 + n/k!) ).

%H Daniel Suteu, <a href="/A269700/b269700.txt">Table of n, a(n) for n = 0..500</a>

%e For n=3, a(3) = floor(69.52294621467075235981513247145953...) = 69.

%t Table[Floor@ Product[1 + n/k!, {k, 0, 10^2}], {n, 0, 38}] (* _Michael De Vlieger_, Mar 27 2016 *)

%o (Sidef)

%o func a(n) {

%o var (prod=1, prev=1)

%o for i in (0 ..^ Inf) {

%o prod *= (1 + n/i!)

%o break if (prod/prev <= 1+1e-100)

%o prev = prod

%o }

%o return floor(prod)

%o }

%o range(0, 100).each { |n| say a(n) }

%o (PARI) a(n) = floor(prodinf(k=0, 1+n/k!)); \\ _Michel Marcus_, Mar 04 2016

%Y Cf. A238695.

%K nonn,easy

%O 0,2

%A _Daniel Suteu_, Mar 03 2016