A000336 a(n) = a(n-1)*a(n-2)*a(n-3)*a(n-4); for n < 5, a(n) = n.
1, 2, 3, 4, 24, 576, 165888, 9172942848, 21035720123168587776, 18437563379178327736384102280592359424, 590180110002114158896983994712576414865667267958188575935810179040280576
Offset: 1
Keywords
Links
- T. D. Noe, Table of n, a(n) for n = 1..15
- B. K. Agarwala and F. C. Auluck, Statistical mechanics and partitions into non-integral powers of integers, Proc. Camb. Phil. Soc., 47 (1951), 207-216. [Annotated scanned copy]
Programs
-
Maple
A000336 := proc(n) option remember; if n <=4 then n else A000336(n-1)*A000336(n-2)*A000336(n-3)*A000336(n-4); fi; end;
-
Mathematica
t = {1, 2, 3, 4}; Do[AppendTo[t, t[[-1]]*t[[-2]]*t[[-3]]*t[[-4]]], {n, 5, 15}] (* T. D. Noe, Jun 19 2012 *) nxt[{a_,b_,c_,d_}]:={b,c,d,a b c d}; NestList[nxt,{1,2,3,4},10][[All,1]] (* Harvey P. Dale, Jan 21 2019 *)
-
PARI
a(n,a=[24,1,2,3,4])={for(n=6,n,a[n%5+1]=a[(n-1)%5+1]^2\a[n%5+1]);a[n%5+1]} \\ M. F. Hasler, Apr 22 2018
-
PARI
first(n) = n = max(n, 5); my(res = vector(n)); for(i=1, 4, res[i] = i); res[5]=24; for(i = 6, n, res[i] = res[i-1]^2 / res[i - 5]); res \\ David A. Corneth, Apr 22 2018
Formula
a(n) = a(n-1)^2 / a(n-5), for n > 5. - M. F. Hasler, Apr 22 2018
Comments