OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..12
EXAMPLE
a(2) = 2*1^2 - 0^2 = 2 - 0 = 2.
a(3) = 2*2^2 - 1^2 = 8 - 1 = 7.
a(4) = 2*7^2 - 2^2 = 98 - 4 = 94.
MATHEMATICA
a[n_]:= a[n]= If[n<2, n, 2*a[n-1]^2 - a[n-2]^2 ];
Table[a[n], {n, 0, 12}] (* G. C. Greubel, May 02 2022 *)
nxt[{a_, b_}]:={b, 2b^2-a^2}; NestList[nxt, {0, 1}, 10][[;; , 1]] (* Harvey P. Dale, Aug 20 2024 *)
PROG
(PARI) a=vector(10); a[1]=0; a[2]=1; for (i=3, 10, a[i]=2*a[i-1]^2-a[i-2]^2); a
(SageMath)
def a(n): # a = A076740
if (n<2): return n
else: return 2*a(n-1)^2 - a(n-2)^2
[a(n) for n in (0..12)] # G. C. Greubel, May 02 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Jun 19 2003
STATUS
approved