OFFSET
0,1
COMMENTS
Original definition: a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n).
This original definition would lead to sequence 4, 16, 63, 248, 976, 3841, ... which agrees to over 2000 terms with the conjectured g.f. = (4 - x^2)/(1 - 4*x + x^3). - M. F. Hasler, Feb 11 2016
FORMULA
Conjecture: a(n) = 4*a(n-1)-a(n-3)+a(n-4). G.f. = (4-x^2+x^3)/(1-4*x+x^3-x^4). - Colin Barker, Feb 16 2012
a(n) = ceiling(a(n-1)^2/a(n-2))-1 for even n > 0, a(n) = floor(a(n-1)^2/a(n-2))+1 for even n > 0. - M. F. Hasler, Feb 11 2016
PROG
(PARI) a=[4, 16]; for(n=2, 2000, a=concat(a, if(bittest(n, 0), a[n]^2\a[n-1]+1, ceil(a[n]^2/a[n-1])-1))); A022030(n)=a[n+1] \\ M. F. Hasler, Feb 11 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited (definition changed to fit data, extended to 3 lines) by M. F. Hasler, Feb 11 2016
STATUS
approved