A318053 a(n) = ceiling(sqrt(2*a(n-1)*a(n-2))), a(1) = a(2) = 1.
1, 1, 2, 2, 3, 4, 5, 7, 9, 12, 15, 19, 24, 31, 39, 50, 63, 80, 101, 128, 161, 204, 257, 324, 409, 515, 650, 819, 1032, 1301, 1639, 2066, 2603, 3280, 4133, 5207, 6561, 8266, 10415, 13122, 16533, 20831, 26245, 33067, 41662, 52491, 66135, 83325
Offset: 1
Keywords
Examples
a(12) = ceiling(sqrt(2*a(11)*a(10))) = ceiling(sqrt(2*15*12)) = ceiling(sqrt(360)) = 19.
Crossrefs
Cf. A017981.
Programs
-
Mathematica
a[n_] := a[n] = If[n<3, 1, Ceiling[Sqrt[2 a[n-1] a[n-2]]]]; Array[a, 50] (* Giovanni Resta, Nov 26 2019 *) RecurrenceTable[{a[1]==a[2]==1,a[n]==Ceiling[Sqrt[2a[n-1]a[n-2]]]},a,{n,50}] (* Harvey P. Dale, Apr 13 2020 *)
-
Python
import math r = [] r.append(1) r.append(1) i = 2 while i < 1001: r.append(math.ceil(math.sqrt(2*r[i-1]*r[i-2]))) i += 1 print(r)
Comments