login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123761 Let k(n) = mod(3,n)-1. Then a(n) = 4*a(n-1) if n is odd, otherwise ((5+k(n))/4)*a(n-1), with a(0) = 1, a(1) = 2. 1
1, 2, 3, 12, 15, 60, 60, 240, 360, 1440, 1800, 7200, 7200, 28800, 43200, 172800, 216000, 864000, 864000, 3456000, 5184000, 20736000, 25920000, 103680000, 103680000, 414720000, 622080000, 2488320000, 3110400000, 12441600000 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

A double modulo switch recursion with four basic ratio states: {4,1,5/4,3/2}.

Surprisingly, the function behaves very much like the factorial function.

10^floor(n/6) | a(n). - G. C. Greubel, Aug 10 2019

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,120).

FORMULA

a(n) = 120*a(n-6) for n>=7.

G.f.: (1+2*x+3*x^2+12*x^3+15*x^4+60*x^5-60*x^6)/(1-120*x^6). - Colin Barker, May 08 2014

MAPLE

seq(coeff(series((1+2*x+3*x^2+12*x^3+15*x^4+60*x^5-60*x^6)/(1-120*x^6), x, n+1), x, n), n = 0 .. 35); # G. C. Greubel, Aug 10 2019

MATHEMATICA

k[n_]:= Mod[n, 3] -1; f[0]=1; f[1]=2; f[n_]:= f[n] = If[Mod[n, 2] == 1, 4*f[n-1], ((5 +k[n])/4)*f[n-1]]; Table[f[n], {n, 0, 35}]

LinearRecurrence[{0, 0, 0, 0, 0, 120}, {1, 2, 3, 12, 15, 60, 60}, 35] (* G. C. Greubel, Aug 10 2019 *)

PROG

(PARI) my(x='x+O('x^35)); Vec((1+2*x+3*x^2+12*x^3+15*x^4+60*x^5-60*x^6 )/(1-120*x^6)) \\ G. C. Greubel, Aug 10 2019

(MAGMA) I:=[2, 3, 12, 15, 60, 60]; [1] cat [n le 6 select I[n] else 120*Self(n-6): n in [1..35]]; // G. C. Greubel, Aug 10 2019

(Sage)

def A123761_list(prec):

    P.<x> = PowerSeriesRing(ZZ, prec)

    return P((1+2*x+3*x^2+12*x^3+15*x^4+60*x^5-60*x^6)/(1-120*x^6)).list()

A123761_list(35) # G. C. Greubel, Aug 10 2019

(GAP) a:=[2, 3, 12, 15, 60, 60];; for n in [7..35] do a[n]:=120*a[n-6]; od; Concatenation([1], a); # G. C. Greubel, Aug 10 2019

CROSSREFS

Sequence in context: A290168 A124486 A260908 * A181121 A333319 A047163

Adjacent sequences:  A123758 A123759 A123760 * A123762 A123763 A123764

KEYWORD

nonn

AUTHOR

Roger L. Bagula, Nov 16 2006

EXTENSIONS

Edited by N. J. A. Sloane, Nov 19 2006

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 26 09:38 EST 2020. Contains 338639 sequences. (Running on oeis4.)