OFFSET
0,2
LINKS
MAPLE
a:= proc(n) local i; n; for i do 4/3*ceil(%);
if %::integer then return % fi od
end:
seq(a(n), n=0..100); # Alois P. Heinz, Mar 01 2021
MATHEMATICA
a[n_] := Module[{k = 4n/3}, While[!IntegerQ[k], k = 4* Ceiling[k]/3]; k];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 17 2023 *)
PROG
(Python3)
from fractions import Fraction
def A085071(n):
c, x = 0, Fraction(n, 1)
while x.denominator > 1 or x <= n:
x = Fraction(4*x.__ceil__(), 3)
c += 1
return x.numerator # Chai Wah Wu, Mar 01 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 11 2003
STATUS
approved