[seqfan] Addition too A000295

DAN_CYN_J dan_cyn_j at comcast.net
Mon Nov 19 19:33:31 CET 2012



Hello all seq. fans, 

  

Observing A000295 in OEIS it does refer to 
the Tower of Hanoi but as far as I can tell it 
does not reflect what I discovered below. 
It makes the Tower a much more important connection to A000295. 
  
If there is something that I missed, please enlighten me. 

It is quite an interesting sequence with a lot of added references. 

I would like to enter this as an added entry too A000295. 
The only difference is the elimination of the first 2 zero terms 
and renumbering starting with (1) as (1). 
That would be the only difference. 
Also a direct connection to the primes using Cf's 
explained near the end of this post. 

  

Rehashing the tower of Hanoi -- 

Three pegs where a stack of (n) number of disks with the 
smallest on top have to be moved completely to another 

 peg one at a time to another peg without placing a larger 

 disk on a smaller disk for each move. 

The correct number of moves for (n) number 
of disks is -- 
(n) disks ----correct # of moves 
 1  -------------2^1-1 
 2  -------------2^2-1 
 3  -------------2^3-1 
 4  -------------2^4-1 
 5  -------------2^5-1 
 6 etc. 

Now (this is important) to emphasize the area of each 
disk the diameter of the smallest disk and each larger disk. 

disk #n------dia.-----------area for each disk           
disk #1 = 1.128379167... ----  1  =(dia/2)^2 * pi = 1 
disk #2 = 1.5957691216...----  2  etc. 
disk #3 = 1.9544100476...----  3 
disk #4 = 2.2567583341...----  4 
etc.. 

Too find the total area for each (n) stack of 
disks is t(n) a triangle number. 
Now to sum each piece as it is moved in the 
process of 2^n-1 moves there are many pieces with the 
same area that are added many times depending 
on the size of (n) and the different area of each disk. 
The larger the disks in each discrete stack the less moves 
are encountered. 

To find this sum for all (n) stacks 
summed during there total 2^n-1 moves --- 
disks # -------sum 
in tower 
1 disk = 2^2-3 =1 
2 disk = 2^3-4 =4 
3 disk = 2^4-5 =11 
4 disk = 2^5-6 =26 
5 disk = 2^6-7 =57 
6 disk = 2^7-8 =120 
7 disk = 2^8-9 =247 
etc. 
Creating this sequence --- 

1,4,11,26,57,120,247... 
sequence A000295 in OEIS. 

  

Now to find out if any set of odd numbered disks are prime! 

Checking a (3) disk stack the two values 4,11 taken from 
the above results where 11 is the 3rd term and 4 is the second 
term then --- 
11/4 =  2.75 = cf = [2:1,3] 
Where if the odd (n) disk stack is prime the cf will always have just 
3 terms and the last term will equal to the prime being tested. 
In the above case (3). 
So (3) is a prime. 

Checking the 7 disk stack as prime --- 
Again taking the two sums from the above table where 247 
is the 7th term and 120 is the 6th term --- 
247/120 = 2.0583333333... = cf =[2:17,7] ---so (7) is prime 

Checked all odd disks stacks from here on except 0(mod 3 or 5) stacks.  
it will identify all primes and composites. 


Odd composites will always have more then 3 terms in the cf. where 
if prime there will only be 3 terms in the cf. and the prime 
being tested will be in the last term. 

Checking if a larger disk stack is prime then -- 
Is 203 disk stack prime? 

You have to first find the divisor. 


2^203 - 204 = 1.2855504354071922204335696738729300820177623950262342682410804e+61 
2^204 - 205 = 2.5711008708143844408671393477458601640355247900524685364821811e+61 
(Note above, 2^204 -205 is the 203rd term in my renumbered sequence.) 
(2^203 -204 is the 202nd term in my renumbered sequence.) 
Then -- 
2.5711008708143844408671393477458601640355247900524685364821811e+61 
/ 
1.2855504354071922204335696738729300820177623950262342682410804e+61 
= 
2.00000000000000000000000000000000000000000000000000000000001579090... 
cf = [2:63327607655526710366185698220341383350628689410159323558673,1,10,3,1,1,2] 
203 is not prime because there are more then 3 terms in the cf. 

  

Is the 223 disk stack a prime? 

2^223 -224 =1.3479973333575319897333507543509815336818572211270286240551805124384e+67 
2^224 -225 =2.6959946667150639794667015087019630673637144422540572481103610248991e+67 
Then --- 
2^224 -225 =2.6959946667150639794667015087019630673637144422540572481103610248991e+67 
/ 
2^223 -224 =1.3479973333575319897333507543509815336818572211270286240551805124384e+67 
= 
2.0000000000000000000000000000000000000000000000000000000000000000165430594320658993803... 
cf = [2,60448310912893811198804966562824284021607947135741193903819753921,223] 
223 is prime. 

Because the cf has only 3 terms and the last term is the 
prime you are checking. 

  

I always had this  hunch that the tower of Hanoi might be 
related to the primes! 

  

This is a very inefficient way to check for primes 

but interesting like the formula where -- 
(n) is odd then---  2^(n-1) ==1(mod n) n= prime. 
If (n) is prime, the prime divisor will always have a residual of (1). 
Which is also very inefficient because the size of 2^(n-1) is 
very large just to check  for a small prime. 

  

Dan 



More information about the SeqFan mailing list