OFFSET
0,1
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = 4*a(n-1) - 2*a(n-2) (holds at least up to n = 1000 but is not known to hold in general).
Empirical g.f.: (3-2*x)/(1-4*x+2*x^2). [Colin Barker, Feb 21 2012]
MATHEMATICA
RecurrenceTable[{a[0] == 3, a[1] == 10, a[n] == Ceiling[a[n - 1]^2/a[n - 2]]}, a, {n, 0, 30}] (* Bruno Berselli, Feb 05 2016 *)
PROG
(Magma) Lxy:=[3, 10]; [n le 2 select Lxy[n] else Ceiling(Self(n-1)^2/Self(n-2)): n in [1..30]]; // Bruno Berselli, Feb 05 2016
(PARI) pisotL(nmax, a1, a2) = {
a=vector(nmax); a[1]=a1; a[2]=a2;
for(n=3, nmax, a[n] = ceil(a[n-1]^2/a[n-2]));
a
}
pisotL(50, 3, 10) \\ Colin Barker, Aug 07 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved