A088706 Duplicate of A087710.
6, 10, 14, 7, 8, 31, 35, 17, 43, 40, 229, 248, 212, 818, 799, 733, 151, 2191, 1139, 20894
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.
# Gives right answer as long as answer is < M. # This is better than the Mathematica or PARI programs. M := 50; f := proc(n) local c,k,tn,tf; global M; k := n/3; c := 0; while whattype(k) <> 'integer' do tn := floor(k); tf := k-tn; tn := tn mod 3^50; k := tn*(tn+tf); c := c+1; od: c; end; # N. J. A. Sloane
f[n_] := If[ Mod[3n, 3] == 0, 0, Length[ NestWhileList[ #1*Floor[ #1] &, n, !IntegerQ[ #2] &, 2]] - 1]; Table[f[n/3], {n, 6, 120}] (* Robert G. Wilson v *)
a(n)=if(n<0,0,c=n/3; x=0; while(frac(c)>0,c=c*floor(c); x++); x) \\ Benoit Cloitre, Sep 29 2003
def A087666(n): c, x = 0, n a, b = divmod(x,3) while b != 0: x *= a c += 1 a, b = divmod(x,3) return c # Chai Wah Wu, Mar 01 2021
Comments