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!)
A076039 Start with 1. Multiply or divide by n accordingly as a(n-1) is smaller or greater than n and then take the integer value (this is to ensure that a(n) > 0 for all n). 5

%I #21 Oct 05 2019 11:31:09

%S 1,2,6,1,5,30,4,32,3,30,2,24,1,14,210,13,221,12,228,11,231,10,230,9,

%T 225,8,216,7,203,6,186,5,165,4,140,3,111,2,78,1,41,1722,40,1760,39,

%U 1794,38,1824,37,1850,36,1872,35,1890,34,1904,33,1914,32,1920,31,1922,30,1920

%N Start with 1. Multiply or divide by n accordingly as a(n-1) is smaller or greater than n and then take the integer value (this is to ensure that a(n) > 0 for all n).

%H William A. Tedeschi, <a href="/A076039/b076039.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = n*a(n-1) if a(n-1) < n, floor(a(n-1)/n) otherwise.

%F a(A003462(k)) = 1. For A003462(k) < n <= A003462(k+1), if n-A003462(k) is odd, then a(n) = (3*A003462(k)+3-n)/2 and if n-A003462(k) is even, then a(n) = n*a(n-1). - _David Wasserman_, Mar 13 2005

%e a(13) = 1 so a(14) = 14*1 = 14;

%e 14 < 15 so a(15) = 14*15 = 210;

%e 210 > 16 so a(16) = floor(210/16) = 13.

%t next[{a_,b_}]:=Module[{c=a+1},{c,If[b<c,b*c,Floor[b/c]]}]; Transpose[ NestList[next,{1,1},65]][[2]] (* _Harvey P. Dale_, Oct 06 2011 *)

%o (Haskell)

%o a076039 n = a076039_list !! (n-1)

%o a076039_list = f 1 1 where

%o f n x = x' : f (n+1) x' where

%o x' = (if x < n then (*) else div) x n

%o -- _Reinhard Zumkeller_, Aug 24 2011

%Y Cf. A003462, A076041, A076042, A046901.

%K easy,nice,nonn,look

%O 1,2

%A _Amarnath Murthy_, Oct 29 2002

%E More terms from _David Wasserman_, Mar 13 2005

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 24 08:21 EDT 2024. Contains 371926 sequences. (Running on oeis4.)