A094696 Records in A007321.
0, 1, 6, 13, 19, 21
Offset: 0
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
A094683 :=proc(n) if n mod 2 = 0 then RETURN(floor(sqrt(n))) else RETURN(floor(n^(3/2))); end if; end proc;
Table[If[EvenQ[n], Floor[Sqrt[n]], Floor[n^(3/2)]], {n, 0, 100}] (* Indranil Ghosh, Apr 07 2017 *)
a(n) = if(n%2,sqrtint(n^3), sqrtint(n)); \\ Indranil Ghosh, Apr 08 2017
import math from sympy import sqrt def a(n): return int(math.floor(sqrt(n))) if n%2 == 0 else int(math.floor(n**(3/2))) print([a(n) for n in range(51)]) # Indranil Ghosh, Apr 08 2017
from math import isqrt def A094683(n): return isqrt(n**3 if n % 2 else n) # Chai Wah Wu, Feb 18 2022
The trajectory of 1 is 3, 5, 11, 36, 6, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... so a(3) = 6.
A007320 := proc(n) local a,ntrack; a := 0 ; ntrack := n ; while ntrack > 1 do ntrack := A094683(ntrack) ; a := a+1 ; end do: return a; end proc: # R. J. Mathar, Apr 19 2013
js[n_] := If[ EvenQ[n], Floor[ Sqrt[n]], Floor[ Sqrt[n^3]]]; f[n_] := Length[ NestWhileList[js, n, # != 1 &]] - 1; Table[ f[n], {n, 99}] (* Robert G. Wilson v, Jun 10 2004 *)
f:=proc(n) if n mod 2 = 0 then RETURN(round(sqrt(n))) else RETURN(round(n^(3/2))); fi; end;
A094685[n_]:=If[Mod[n,2]==0,Round[Sqrt[n]],Round[n^(3/2)]];Array[A094685,76,0] (* James C. McMahon, Apr 15 2025 *)
from gmpy2 import isqrt_rem def A094685(n): i, j = isqrt_rem(n**3 if n % 2 else n) return int(i+ int(4*(j-i) >= 1)) # Chai Wah Wu, Aug 17 2016
mjs[n_] := If[ EvenQ[n], Round[ Sqrt[n]], Round[ Sqrt[n^3]]]; f[n_] := Length[ NestWhileList[mjs, n, # != 1 &]] - 1; a = {0}; Do[ b = f[n]; If[b > a[[ -1]], AppendTo[a, b]], {n, 250000}]; a
mjs[n_] := If[ EvenQ[n], Round[ Sqrt[n]], Round[ Sqrt[n^3]]];; f[n_] := Length[ NestWhileList[mjs, n, # != 1 &]] - 1; a = {0}; Do[ b = f[n]; If[b >a[[ -1]] AppendTo[a, b]; Print[n]], {n, 250000}]
mjs[n_] := If[ EvenQ[n], Round[ Sqrt[n]], Round[ Sqrt[n^3]]]; f[n_] := Length[ NestWhileList[mjs, n, # != 1 &]] - 1; a = Table[0, {66}]; Do[ b = f[n]; If[b < 67 && a[[b]] == 0, a[[b]] = n], {n, 44900}]; a
Comments