Skip to main content
numerical type corrected
Source Link
Gottfried Helms
  • 5.3k
  • 1
  • 22
  • 38

(btw: Pari/GP gives also a finite length for $n=229$; (the same number $6093$$6309$ steps as in @Mirko's comment)

(btw: Pari/GP gives also a finite length for $n=229$; (the same number $6093$ steps as in @Mirko's comment)

(btw: Pari/GP gives also a finite length for $n=229$; (the same number $6309$ steps as in @Mirko's comment)

image for n=229 added
Source Link
Gottfried Helms
  • 5.3k
  • 1
  • 22
  • 38

Update
according to the nice pictures of @legionMamma I made one for the n=229 case in logarithmic scale (more informative than that in the thread's question-box)

iteration map with startvalue n=229 (convergent at step k=6309)

Update
according to the nice pictures of @legionMamma I made one for the n=229 case in logarithmic scale (more informative than that in the thread's question-box)

iteration map with startvalue n=229 (convergent at step k=6309)

deleted 1480 characters in body
Source Link
Gottfried Helms
  • 5.3k
  • 1
  • 22
  • 38

Update 2024

Here I give the Pari/GP-computed results for the cases which could not be solved by @mirkos routine in his comment. I used Pari/GP's "ispseudoprime()" function which allows fast testing to rather large primes

 397: 0, 7, 6, 19, 8, 9, 6, 18, 9, 8, 96, 44, 203, 98, 54, 35, 214
 827: 0, 8, 10, 15, 9, 13, 9, 14, 9, 7, 22, 15, 35, 37, 68, 49, 27, 10, 53, 145, 201
1009: 0, 6, 11, 12, 24, 8, 25, 29, 54, 15, 78, 49, 6, 12, 140, 11, 317, 71
1061: 0, 8, 8, 21, 10, 13, 5, 21, 25, 7, 32, 10, 13, 6, 5, 14, 18, 20, 9, 27, 12, 41, 33, 14, 11, 52, 25, 37, 52, 14, 23, 141, 35, 79, 78
1069: 0, 8, 9, 6, 18, 9, 8, 96, 44, 203, 98, 54, 35, 214
1091: 0, 8, 14, 5, 8, 34, 18, 7, 5, 7, 8, 25, 34, 19, 26, 58, 28, 8, 8, 21, 10, 13, 5, 21, 25, 7, 32, 10, 13, 6, 5, 14, 18, 20, 9, 27, 12, 41, 33, 14, 11, 52, 25, 37, 52, 14, 23
1123: 0, 10, 6, 19, 8, 9, 6, 18, 9, 8, 96, 44, 203, 98, 54, 35, 214
1129: 0, 12, 6, 5, 14, 18, 20, 9, 27, 12, 41, 33, 14, 11, 52, 25, 37, 52, 14, 23, 141, 35, 79, 78, 64, 149
1193: 0, 7, 9, 21, 17, 6, 5, 17, 33, 37, 54, 217, 14, 138, 25, 8, 12, 113, 18




{listf(a0,maxk=1000)=my(ql=List,cnt=0);
for(k=1,maxk, 
     if(a0==2,listput(ql,cnt);return(Vec(ql)));
     if(ispseudoprime(a0),
           a0*=a0;listput(ql,cnt);cnt=0, 
           a0 \= 2;cnt++);
     );
 Vec(ql)}  
   - - - - - - - - - - - - 
 listf(1193)

End Update

Update 2024

Here I give the Pari/GP-computed results for the cases which could not be solved by @mirkos routine in his comment. I used Pari/GP's "ispseudoprime()" function which allows fast testing to rather large primes

 397: 0, 7, 6, 19, 8, 9, 6, 18, 9, 8, 96, 44, 203, 98, 54, 35, 214
 827: 0, 8, 10, 15, 9, 13, 9, 14, 9, 7, 22, 15, 35, 37, 68, 49, 27, 10, 53, 145, 201
1009: 0, 6, 11, 12, 24, 8, 25, 29, 54, 15, 78, 49, 6, 12, 140, 11, 317, 71
1061: 0, 8, 8, 21, 10, 13, 5, 21, 25, 7, 32, 10, 13, 6, 5, 14, 18, 20, 9, 27, 12, 41, 33, 14, 11, 52, 25, 37, 52, 14, 23, 141, 35, 79, 78
1069: 0, 8, 9, 6, 18, 9, 8, 96, 44, 203, 98, 54, 35, 214
1091: 0, 8, 14, 5, 8, 34, 18, 7, 5, 7, 8, 25, 34, 19, 26, 58, 28, 8, 8, 21, 10, 13, 5, 21, 25, 7, 32, 10, 13, 6, 5, 14, 18, 20, 9, 27, 12, 41, 33, 14, 11, 52, 25, 37, 52, 14, 23
1123: 0, 10, 6, 19, 8, 9, 6, 18, 9, 8, 96, 44, 203, 98, 54, 35, 214
1129: 0, 12, 6, 5, 14, 18, 20, 9, 27, 12, 41, 33, 14, 11, 52, 25, 37, 52, 14, 23, 141, 35, 79, 78, 64, 149
1193: 0, 7, 9, 21, 17, 6, 5, 17, 33, 37, 54, 217, 14, 138, 25, 8, 12, 113, 18




{listf(a0,maxk=1000)=my(ql=List,cnt=0);
for(k=1,maxk, 
     if(a0==2,listput(ql,cnt);return(Vec(ql)));
     if(ispseudoprime(a0),
           a0*=a0;listput(ql,cnt);cnt=0, 
           a0 \= 2;cnt++);
     );
 Vec(ql)}  
   - - - - - - - - - - - - 
 listf(1193)

End Update

added 1361 characters in body
Source Link
Gottfried Helms
  • 5.3k
  • 1
  • 22
  • 38
Loading
added 1361 characters in body
Source Link
Gottfried Helms
  • 5.3k
  • 1
  • 22
  • 38
Loading
Typo correction.
Source Link
Joseph O'Rourke
  • 150.8k
  • 36
  • 358
  • 958
Loading
Source Link
Gottfried Helms
  • 5.3k
  • 1
  • 22
  • 38
Loading