OFFSET
1,3
COMMENTS
Named because each term is the nearest integer to twice the geometric mean of the previous two terms. This is similar to the Fibonacci sequence, where each term is twice the arithmetic mean of the previous two terms. In fact, the early terms mirror the Fibonacci sequence.
FORMULA
a(n) ~ c * 2^(2*n/3), where c = 0.50182724761947676453167569419757096890286053854137516239835895319268638286015... - Vaclav Kotesovec, Dec 20 2018
EXAMPLE
For n=6, a(5) is 5 and a(4) is 3. 3 * 5 is 15 and twice the square root of 15 is just above 7.745. This rounds to 8, so a(6) is 8.
MAPLE
a:=proc(n) option remember: `if`(n<3, 1, round(2*sqrt(a(n-1)*a(n-2)))) end: seq(a(n), n=1..50); # Muniru A Asiru, Dec 20 2018
MATHEMATICA
a[1] =1 ; a[2] = 1; a[n_] := a[n] = Round[2 * Sqrt[a[n-1] * a[n-2]]]; Array[a, 40] (* Amiram Eldar, Dec 04 2018 *)
PROG
(PARI) seq(n)={my(v=vector(n)); v[1]=v[2]=1; for(n=3, n, v[n]=round(2*sqrt(v[n-1]*v[n-2]))); v} \\ Andrew Howroyd, Dec 03 2018
(Java) public static int G(int n) {
if(n==1) {return 1; }
if(n==2) {return 1; }
return Math.round(2*Math.sqrt(G(n-1)*G(n-2))); //Recursive definition
} \\ James E Davis, Dec 03 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
James E Davis, Dec 03 2018
STATUS
approved