login
a(n) is the least number of repetitions such that the result of the repeated execution of the division f <- f/n started at f=1 produces 0, when the division is performed using Commodore BASIC.
1

%I #16 Aug 16 2020 14:02:22

%S 129,81,65,56,50,46,43,41,39,38,36,35,34,33,33,32,31,31,30,30,29,29,

%T 28,28,28,27,27,27,27,26,26,26,26,25,25,25,25,25,25,24,24,24,24,24,24,

%U 24,23,23,23,23,23,23,23,23,23,22,22,22,22,22,22,22,22,22,22,22

%N a(n) is the least number of repetitions such that the result of the repeated execution of the division f <- f/n started at f=1 produces 0, when the division is performed using Commodore BASIC.

%C A floating point number in Commodore BASIC has five bytes: one bit for the sign, 31 bits for the mantissa, eight bits for the exponent.

%H C64 Wiki, <a href="https://www.c64-wiki.com/wiki/Floating_point_arithmetic">Floating point arithmetic</a>

%H Markus Sigg, <a href="/A337068/a337068.png">Screenshot of the program running on a PET 2001 emulated with MAME.</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Commodore_BASIC">Commodore BASIC</a>

%o (BASIC)

%o 10 FOR N=2 TO 66

%o 20 A=1

%o 30 I=1

%o 40 A=A/N

%o 50 IF A>0 THEN I=I+1:GOTO 40

%o 60 PRINT I;

%o 70 NEXT

%Y Cf. A336777, A336781.

%K nonn,fini

%O 2,1

%A _Markus Sigg_, Aug 13 2020