OFFSET
1,4
COMMENTS
a(n) = r(n+2)/sqrt(2); r(1) = sqrt(2); r(n) = r(n-1)/sqrt(n-1) if r(n-1) is a square else r(n) = r(n-1)*floor(sqrt(n-1).
A variation of Recamán's A008336.
FORMULA
a(n) = Product_{k=1..n} floor(sqrt(k)). - Ridouane Oudra, Feb 16 2023
MAPLE
r := proc(n) option remember; if n = 1 then sqrt(2)
elif type(r(n-1), square) then r(n-1)/sqrt(n-1)
else r(n-1)*floor(sqrt(n-1)) fi end:
A195458 := proc(n) r(n+2)/sqrt(2) end:
MATHEMATICA
a[1] = 1;
a[n_] := a[n] = Floor[Sqrt[n]] a[n - 1]
Table[a[n], {n, 20}] (* David Callan, Aug 14 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Sep 18 2011
EXTENSIONS
Better name from David Callan, Aug 14 2013
STATUS
approved