Post Reply 
(12C) Palindromic Number
09-09-2019, 08:01 AM (This post was last modified: 09-09-2019 08:03 AM by Gamo.)
Post: #1
(12C) Palindromic Number
A palindromic number are those numbers which read the same backward as forward.
The examination of these numbers is a field rich with possibilities for creative computing.

Begin with any positive integer. If the sum is not a palindrome, treat it as the original number and continue.
The process stops when a palindrome is obtained.

For example, beginning with 78:

1. 78 + 87 = 165
2. 165 + 561 = 726
3. 726 + 627 = 1353
4. 1353 + 3531 = 4884

The conjecture, often assumed true, is that this process will always lead to a palindrome?

How to run this program using example above: FIX 0

78 [R/S] display 4884 [X<>Y] display 4

Palindrome is 4884 and took 4 iterations
----------------------------------------------------
Program:
Code:

01 STO 1
02 STO 0
03 STO-0
04 INTG
05  1
06  0
07 STOx0
08  ÷
09 FRAC
10 STO+0
11 LSTx
12 X=0
13 GTO 15
14 GTO 04
15 RCL 0
16 RCL 1
17  -
18 X=0
19 GTO 26
20  1
21 STO+2
22 RCL 0
23 RCL 1
24  +
25 GTO 01
26 RCL 2
27 RCL 0
28  0
29 STO 2
30 R↓

Remark:
This program is for use on general purpose only some number cannot be deal with this limited computation limit.
Such number this calculator must need more than 10 digits to display and
some example number is 196 try to run this on a super computer !!!

Gamo
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)