OFFSET
0,4
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1,1,1,-1,1,-1,1,-1).
FORMULA
From Robert Israel, Dec 06 2022: (Start)
a(6*k) = 6*k+3 for k >= 7.
a(6*k+1) = 4*k+1.
a(6*k+2) = 4*k for k >= 1.
a(6*k+3) = 6*k+1 for k >= 1.
a(6*k+4) = 9*k+7 for k >= 1.
a(6*k+5) = 9*k+12 for k >= 6.
(End)
MAPLE
A[0]:= 1: A[1]:= 1:
for n from 1 to 99 do A[n+1]:= ceil(n*A[n]/A[n-1]) od:
seq(A[i], i=0..100); # Robert Israel, Dec 06 2022
MATHEMATICA
nxt[{n_, a_, b_}]:={n+1, b, Ceiling[((n+1)b)/a]}; Join[{1}, Transpose[ NestList[ nxt, {0, 1, 1}, 80]][[3]]] (* Harvey P. Dale, Mar 04 2013 *)
PROG
(PARI) print1(a=1, ", ", b=1, ", "); for(n=2, 71, print1(c=ceil((n-1)*b/a), ", "); a=b; b=c) \\ Klaus Brockhaus, Oct 02 2008
(PARI) a(n)=if(n<37, return([1, 1, 1, 2, 6, 12, 10, 5, 4, 7, 16, 23, 16, 9, 8, 13, 25, 31, 22, 13, 12, 19, 34, 40, 28, 17, 16, 25, 43, 49, 34, 21, 20, 31, 52, 58, 40][n+1])); my(r=n%6, k=n\6); if(r==0, 6*k+3, r==1, 4*k+1, r==2, 4*k, r==3, 6*k+1, r==4, 9*k+7, 9*k+12) \\ Charles R Greathouse IV, Dec 07 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Leroy Quet, Oct 01 2008
EXTENSIONS
More terms from Klaus Brockhaus and R. J. Mathar, Oct 02 2008
STATUS
approved