login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A008336 a(n+1) = a(n)/n if n|a(n) else a(n)*n, a(1) = 1. 8

%I

%S 1,1,2,6,24,120,20,140,1120,10080,1008,11088,924,12012,858,12870,

%T 205920,3500640,194480,3695120,184756,3879876,176358,4056234,97349616,

%U 2433740400,93605400,2527345800

%N a(n+1) = a(n)/n if n|a(n) else a(n)*n, a(1) = 1.

%C The graph of log_10(a(n)+1) seems to suggest that log(a(n)) is asymptotic to C*n where C is approximately 0.8. - _Daniel Forgues_, Sep 18 2011

%H Indranil Ghosh, <a href="/A008336/b008336.txt">Table of n, a(n) for n = 1..2732</a> (terms 1..1000 from T. D. Noe)

%H R. K. Guy and R. Nowakowski, <a href="http://www.jstor.org/stable/2975272">Unsolved Problems</a>, Amer. Math. Monthly, vol. 102 (1995), circa page 924.

%H Nick Hobson, <a href="/A008336/a008336.py.txt">Python program for this sequence</a>

%H N. J. A. Sloane, <a href="http://neilsloane.com/doc/sg.txt">My favorite integer sequences</a>, in Sequences and their Applications (Proceedings of SETA '98).

%H <a href="/index/Rea#Recaman">Index entries for sequences related to Recamán's sequence</a>

%p A008336 := proc(n) option remember; if n = 1 then 1 elif A008336(n-1) mod (n-1) = 0 then A008336(n-1)/(n-1) else A008336(n-1)*(n-1); fi; end;

%t a[n_] := a[n] = If[ Divisible[ a[n-1], n-1], a[n-1]/(n-1), a[n-1]*(n-1)]; a[1] = 1; Table[a[n], {n, 1, 28}] (* _Jean-François Alcover_, Dec 02 2011 *)

%t nxt[{n_,a_}]:={n+1,If[Divisible[a,n],a/n,n*a]}; Transpose[ NestList[ nxt,{1,1},30]][[2]] (* _Harvey P. Dale_, May 09 2016 *)

%o (Haskell)

%o a008336 n = a008336_list !! (n-1)

%o a008336_list = 1 : zipWith (/*) a008336_list [1..] where

%o x /* y = if x `mod` y == 0 then x `div` y else x*y

%o -- _Reinhard Zumkeller_, Feb 22 2012, Oct 25 2010

%Y Cf. A005132, A065422.

%Y Cf. A195504 Product of numbers up to n-1 used as divisors in A008336(n), n >= 2; a(1) = 1.

%K nonn,easy,nice,look

%O 1,3

%A B. Recamán

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 15 19:54 EST 2018. Contains 317240 sequences. (Running on oeis4.)