A090529 a(n) is the smallest positive m such that n <= m!.
1, 1, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 0
Keywords
Examples
a(4)=3 because 2! < 4 <= 3!; a(24)=4 because 3! < 24 <= 4!.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000,
- Yi Yuan and Zhang Wenpeng, On the Mean Value of the Analogue of Smarandache Function.
- Index entries for sequences related to factorial numbers
Programs
-
Haskell
a090529 n = a090529_list !! n a090529_list = f 1 1 0 where f w v u = if u <= w then v : f w v (u+1) else v' : f (w*v') v' (u+1) where v' = v + 1 -- Reinhard Zumkeller, Jan 05 2014
-
Maple
A090529 := proc(n) local a; for a from 1 do if a! >= n then return a; end if; end do: end proc: seq(A090529(n),n=0..100) ; # R. J. Mathar, Apr 06 2022
-
Mathematica
Array[Block[{m = 1}, While[# > m!, m++]; m] &, 105, 0] (* Michael De Vlieger, Nov 18 2017 *) With[{f=Table[{m,m!},{m,10}]},Table[Select[f,#[[2]]>=n&][[1]],{n,0,110}]][[All,1]] (* Harvey P. Dale, Jan 01 2020 *)
-
PARI
a(n)=if(n<0,0,p=1;while(p!
-
PARI
A090529(n)=for(m=1,n,m!
M. F. Hasler, Jan 16 2013
Formula
a(n+1) = A084558(n) + 1. - Reinhard Zumkeller, Jan 05 2014
Extensions
Better description and more terms from Zhang Wenpeng (wpzhang(AT)nwu.edu.cn), Mar 29 2004
Comments