From: tinywanda@aol.com (TinyWanda)
Newsgroups: comp.sys.hp48
Subject: MoreTroublesomeGibberishFromTinyWanda
Lines: 605
NNTP-Posting-Host: ladder01.news.aol.com
X-Admin: news@aol.com
Date: 21 Nov 1998 21:59:09 GMT
Organization: AOL http://www.aol.com
Message-ID: <19981121165909.09022.00000479@ng34.aol.com>
Xref: republic.btigate.com comp.sys.hp48:18887

------------------------------------:: o
The Kathy Prime Number Organizer
------------------------------------:: o

The Kathi program/directory was created after i was prompted by the idyl
ramblings of Kathy J.M. ( Kjm2@aol.com ) as she discribed this idea that she
had for creating a tool to predict the future locations of Prime Numbers...

'''''''''''''''''''''''''''''''''
Kathy's explanation:
'''''''''''''''''''''''''''''''''

My approach to solving primes is to imagine a three dimensional space (or more
if necessary) that when contained by x number of planes will equal x-1 and that
number will be prime. 

Okay - if you make a table with number 1 through 10 and then 11 through 20 and
etc etc as the rows and you only enter the primes that you know from 1 to 100
and then you add up each row to make a new column and then you start to see a
pattern.  This can be repeated up to 400 or 500 depending on how will you can
remember the larger primes. 
There is a pattern
I swear there is

And i don't care for all those math heads that want to calculate the primes
with "special" equations.

It is certainly not the most creative way to identify a prime number

'''''''''''''''''''''''''''''''''

When i asked to see a graphical representation of her idea, she told me that
she only had some scribblings of it on paper...!!!
Apparently---She doesn't have any 'automated' tools to generate such things...
So i thought i would throw something together to see what her idea looked
like...
The Kathi Directory essentially consists of 2 programs that do this, 
While the rest are support programs.

:-------------------------------------------:: <    :o:

What The Created Data Set Looks Like:

------------------------------------:: o

%%HP: T(1)A(D)F(.);

Primes : Sets Of 10

  *    2    3    *    5    *    7    *    *    *    = 17
 11    *   13    *    *    *   17    *   19    *    = 60
  *    *   23    *    *    *    *    *   29    *    = 52
 31    *    *    *    *    *   37    *    *    *    = 68
 41    *   43    *    *    *   47    *    *    *    = 131
  *    *   53    *    *    *    *    *   59    *    = 112
 61    *    *    *    *    *   67    *    *    *    = 128
 71    *   73    *    *    *    *    *   79    *    = 223
  *    *   83    *    *    *    *    *   89    *    = 172
  *    *    *    *    *    *   97    *    *    *    = 97
 101   *   103   *    *    *   107   *   109   *    = 420
  *    *   113   *    *    *    *    *    *    *    = 113
  *    *    *    *    *    *   127   *    *    *    = 127
 131   *    *    *    *    *   137   *   139   *    = 407
  *    *    *    *    *    *    *    *   149   *    = 149
 151   *    *    *    *    *   157   *    *    *    = 308
  *    *   163   *    *    *   167   *    *    *    = 330
  *    *   173   *    *    *    *    *   179   *    = 352
 181   *    *    *    *    *    *    *    *    *    = 181
 191   *   193   *    *    *   197   *   199   *    = 780
  *    *    *    *    *    *    *    *    *    *    = 0
 211   *    *    *    *    *    *    *    *    *    = 211
  *    *   223   *    *    *   227   *   229   *    = 679
  *    *   233   *    *    *    *    *   239   *    = 472
 241   *    *    *    *    *    *    *    *    *    = 241
 251   *    *    *    *    *   257   *    *    *    = 508
  *    *   263   *    *    *    *    *   269   *    = 532
 271   *    *    *    *    *   277   *    *    *    = 548
 281   *   283   *    *    *    *    *    *    *    = 564
  *    *   293   *    *    *    *    *    *    *    = 293
  *    *    *    *    *    *   307   *    *    *    = 307
 311   *   313   *    *    *   317   *    *    *    = 941
  *    *    *    *    *    *    *    *    *    *    = 0
 331   *    *    *    *    *   337   *    *    *    = 668
  *    *    *    *    *    *   347   *   349   *    = 696
  *    *   353   *    *    *    *    *   359   *    = 712
  *    *    *    *    *    *   367   *    *    *    = 367
  *    *   373   *    *    *    *    *   379   *    = 752
  *    *   383   *    *    *    *    *   389   *    = 772
  *    *    *    *    *    *   397   *    *    *    = 397
 401   *    *    *    *    *    *    *   409   *    = 810
  *    *    *    *    *    *    *    *   419   *    = 419
 421   *    *    *    *    *    *    *    *    *    = 421
 431   *   433   *    *    *    *    *   439   *    = 1303
  *    *   443   *    *    *    *    *   449   *    = 892
  *    *    *    *    *    *   457   *    *    *    = 457
 461   *   463   *    *    *   467   *    *    *    = 1391
  *    *    *    *    *    *    *    *   479   *    = 479
  *    *    *    *    *    *   487   *    *    *    = 487
 491   *    *    *    *    *    *    *   499   *    = 990
  *    *   503   *    *    *    *    *   509   *    = 1012
  *    *    *    *    *    *    *    *    *    *    = 0
 521   *   523   *    *    *    *    *    *    *    = 1044
  *    *    *    *    *    *    *    *    *    *    = 0
 541   *    *    *    *    *   547   *    *    *    = 1088
  *    *    *    *    *    *   557   *    *    *    = 557
  *    *   563   *    *    *    *    *   569   *    = 1132
 571   *    *    *    *    *   577   *    *    *    = 1148
  *    *    *    *    *    *   587   *    *    *    = 587
  *    *   593   *    *    *    *    *   599   *    = 1192
 601   *    *    *    *    *   607   *    *    *    = 1208
  *    *   613   *    *    *   617   *   619   *    = 1849
  *    *    *    *    *    *    *    *    *    *    = 0
 631   *    *    *    *    *    *    *    *    *    = 631
 641   *   643   *    *    *   647   *    *    *    = 1931
  *    *   653   *    *    *    *    *   659   *    = 1312
 661   *    *    *    *    *    *    *    *    *    = 661
  *    *   673   *    *    *   677   *    *    *    = 1350
  *    *   683   *    *    *    *    *    *    *    = 683
 691   *    *    *    *    *    *    *    *    *    = 691
 701   *    *    *    *    *    *    *   709   *    = 1410
  *    *    *    *    *    *    *    *   719   *    = 719
  *    *    *    *    *    *   727   *    *    *    = 727
  *    *   733   *    *    *    *    *   739   *    = 1472
  *    *   743   *    *    *    *    *    *    *    = 743
 751   *    *    *    *    *   757   *    *    *    = 1508
 761   *    *    *    *    *    *    *   769   *    = 1530
  *    *   773   *    *    *    *    *    *    *    = 773
  *    *    *    *    *    *   787   *    *    *    = 787
  *    *    *    *    *    *   797   *    *    *    = 797
  *    *    *    *    *    *    *    *   809   *    = 809
 811   *    *    *    *    *    *    *    *    *    = 811
 821   *   823   *    *    *   827   *   829   *    = 3300
  *    *    *    *    *    *    *    *   839   *    = 839
  *    *    *    *    *    *    *    *    *    *    = 0
  *    *   853   *    *    *   857   *   859   *    = 2569
  *    *   863   *    *    *    *    *    *    *    = 863
  *    *    *    *    *    *   877   *    *    *    = 877
 881   *   883   *    *    *   887   *    *    *    = 2651
  *    *    *    *    *    *    *    *    *    *    = 0
  *    *    *    *    *    *   907   *    *    *    = 907
 911   *    *    *    *    *    *    *   919   *    = 1830
  *    *    *    *    *    *    *    *   929   *    = 929
  *    *    *    *    *    *   937   *    *    *    = 937
 941   *    *    *    *    *   947   *    *    *    = 1888
  *    *   953   *    *    *    *    *    *    *    = 953
  *    *    *    *    *    *   967   *    *    *    = 967
 971   *    *    *    *    *   977   *    *    *    = 1948
  *    *   983   *    *    *    *    *    *    *    = 983
 991   *    *    *    *    *   997   *    *    *    = 1988
  *    *    *    *    *    *    *    *  1009   *    = 1009
  *    *  1013   *    *    *    *    *  1019   *    = 2032
1021   *    *    *    *    *    *    *    *    *    = 1021
1031   *  1033   *    *    *    *    *  1039   *    = 3103
  *    *    *    *    *    *    *    *  1049   *    = 1049
1051   *    *    *    *    *    *    *    *    *    = 1051
1061   *  1063   *    *    *    *    *  1069   *    = 3193
  *    *    *    *    *    *    *    *    *    *    = 0
  *    *    *    *    *    *  1087   *    *    *    = 1087
1091   *  1093   *    *    *  1097   *    *    *    = 3281
  *    *  1103   *    *    *    *    *  1109   *    = 2212
  *    *    *    *    *    *  1117   *    *    *    = 1117
  *    *  1123   *    *    *    *    *  1129   *    = 2252
  *    *    *    *    *    *    *    *    *    *    = 0
  *    *    *    *    *    *    *    *    *    *    = 0
1151   *  1153   *    *    *    *    *    *    *    = 2304
  *    *  1163   *    *    *    *    *    *    *    = 1163
1171   *    *    *    *    *    *    *    *    *    = 1171
1181   *    *    *    *    *  1187   *    *    *    = 2368
  *    *  1193   *    *    *    *    *    *    *    = 1193
1201   *    *    *    *    *    *    *    *    *    = 1201
  *    *  1213   *    *    *  1217   *    *    *    = 2430
  *    *  1223   *    *    *    *    *  1229   *    = 2452

It may not be all that obvious yet, But when you make a Bar chart of the
totals, The Quantumized Pattern just jumps out at you...!

:-------------------------------------------:: <    :o:

The Kathi Directory Contains 10 Objects

------------------------------------:: o

Kathi     The Formatting Program
->Bar     Creates a Bar Plot from Kathi data
.200      The first 200 Primes
Prm?      Finds the Prime Factors of a Number
Cntr      Centers an object in a String
->|       Returns a list of Primes
Bep       Makes Bepping noises
EDAT      Sigma Data
EPAR      Sigma Plot Data
PPAR      PICT Data

:-------------------------------------------:: <    :o:

How To Use Them:

------------------------------------:: o
Kathi     
The Kathi program requires 4 objects for input:
This program has a double click prompt feature to remind you of the Input
structure.
4:   The Title
3:   List of Target Numbers
2:   The Set Limit
1:   The Terminus Limit

The Title is just that, Some little string that is included on the top of the
final string, To let you know what the data represents.

The List of Target Numbers is a list of those numbers that the final string
will include, And then add together.

The Set Limit is the length of each horizontal row.

The Terminus limit is where you want to stop the chart.

The Output is:
2:        The list of Totals... 
1:      "The Formated String...

The list of totals are the sums of each row.
The Formatted String is the Chart itself.

For the Example Given above, the Input would be:
4:                "Primes"
3:   { 2 3 5 7 11 13 17...
2:                      10
1:                    1229   ( The 200th Prime )

And The Output would be:
2:     Totals: { 17 60 52... 
1:     "Prime : Sets Of 1...

------------------------------------:: o
->Bar 
Takes the List of Totals provided by Kathi and placed on 1:, 
And creates a Bar Graph of the sums...
The x-Range represents the arrangement of rows as they were summed...???
The y-Range are the sum-totals of those Set Groups.
The Output to the Stack is the recalled PICT.

------------------------------------:: o
.200      
Just a List of The first 200 Primes.

------------------------------------:: o
Prm?
Takes any Positive Integer & Finds the Prime Factors of that Number.
Output is the number itself on 2: and the list of Prime Factors on 1:

------------------------------------:: o
Cntr
Takes an Object on 2: and the size of the desired String on 1:
Then Centers the object in a String.
This is a dumb program and if taunted with cruelty, 
Such as bad data, It will respond with a hissy fit.

------------------------------------:: o
->|
This is a PreCreated Program in which all the variables are hard coded into the
program...!
...Which returns a list of Primes from 2 to the 200th Prime.
To change this limit, 
Open the program with EDIT, 
Find the number 200 
And change it to something else.

------------------------------------:: o
Bep
Makes Bepping noises.
Input is the number 1, 2, 3, 4 or 5.
Or a list of two numbers, 
The first being the number of beps desired,
And the second being 1<=b<=5 which defines the kind of bep returned as a bep.

------------------------------------:: o
EDAT      Sigma Data

------------------------------------:: o
EPAR      Sigma Plot Parameters

------------------------------------:: o
PPAR      PICT Plot Parameters

:-------------------------------------------:: <    :o:

CheckSums & Such:

------------------------------------:: o

Directory:    Kathi   i is actually the CHR(161)
CheckSum:   # EE1Ch
Size:          4230

------------------------------------:: o
Program:      Kathi 
CheckSum:   # 4FE5h
Size:           488

------------------------------------:: o
Program:      ->Bar
CheckSum:   # 281Ah
Size:            66

------------------------------------:: o
List:          .200
CheckSum:   # C300h
Size:          2092

------------------------------------:: o
Program:       Prm?
CheckSum:   # 2FE2h
Size:         299.5

------------------------------------:: o
Program:       Cntr
CheckSum:   # D453h
Size:           102

------------------------------------:: o
Program:        ->|
CheckSum:   # BF49h
Size:         119.5

------------------------------------:: o
Program:        Bep
CheckSum:   # 74BFh
Size:         350.5

------------------------------------:: o
System:        EDAT
CheckSum:   # DD51h
Size:         607.5

------------------------------------:: o
System:        EPAR
CheckSum:   # 2DD4h
Size:            26

------------------------------------:: o
System:        PPAR
CheckSum:   # B14Dh
Size:            63

:-------------------------------------------:: <    :o:

The Kathi Directory

------------------------------------:: o

%%HP: T(3)A(D)F(.);
DIR
  Kath\161
    \<<
"4: Name   3: {Targets}
2: RowLimit  1: \GWLimit"
.2 WAIT KEY
      \<< DROP ""
INPUT OBJ\->
      \>> :: DROP
IFTE DUP \->STR SIZE
1 + 10 CHR { } \-> \241
\163 \Gr \GW \231 \|v $
      \<< CLLCD \241
" : Sets Of " \Gr \|v \|v
+ + + + 1 \GW
        FOR \Gb 0
SWAP 0 \Gr 1 -
          FOR \Ga \Gb \Ga
+ \163 OVER POS
            \<< DUP \GW
SWAP - 3 DISP DUP
\->STR \231 Cntr SWAP 4
ROLL + 3 ROLLD +
            \>>
            \<< DROP
"*" \231 Cntr +
            \>> IFTE
          NEXT
"  = " ROT '$' OVER
STO+ \|v + + + \Gr
        STEP $
"Totals" \->TAG SWAP
{ 26 3 } Bep
      \>>
    \>>
  \->Bar
    \<< OBJ\-> DUP R\->B
DUP PDIM 1 2 \->LIST
\->ARRY '\GSDAT' STO
BARPLOT PICT RCL
PICTURE
    \>>
  \183200 { 2 3 5 7 11
13 17 19 23 29 31
37 41 43 47 53 59
61 67 71 73 79 83
89 97 101 103 107
109 113 127 131 137
139 149 151 157 163
167 173 179 181 191
193 197 199 211 223
227 229 233 239 241
251 257 263 269 271
277 281 283 293 307
311 313 317 331 337
347 349 353 359 367
373 379 383 389 397
401 409 419 421 431
433 439 443 449 457
461 463 467 479 487
491 499 503 509 521
523 541 547 557 563
569 571 577 587 593
599 601 607 613 617
619 631 641 643 647
653 659 661 673 677
683 691 701 709 719
727 733 739 743 751
757 761 769 773 787
797 809 811 821 823
827 829 839 853 857
859 863 877 881 883
887 907 911 919 929
937 941 947 953 967
971 977 983 991 997
1009 1013 1019 1021
1031 1033 1039 1049
1051 1061 1063 1069
1087 1091 1093 1097
1103 1109 1117 1123
1129 1151 1153 1163
1171 1181 1187 1193
1201 1213 1217 1223
1229 }
  Prm?
    \<< CLLCD DUP { }
SWAP 2 SWAP 0 1
      FOR z z
        DO 2 PICK 4
DISP
          DO 2 +
DUP 4 PICK SWAP - 2
DISP DUP2 / FP NOT
          UNTIL 4
PICK 3 PICK < OR
          END DUP 4
ROLL \<=
          \<< DUP 4
ROLL SWAP + 3 ROLLD
DUP 2 - 3 ROLLD / z
            \<< DUP \v/
            \>> 2
IFTE CEIL IP SWAP
ROT 0
          \>>
          \<< DROP
DUP \v/ CEIL IP SWAP
1
          \>> IFTE
        UNTIL
        END
      NEXT SWAP
DROP DUP 1 >
      \<< +
      \>>
      \<< DROP
      \>> IFTE
    \>>
  Cntr
    \<< ""
      WHILE OVER
      REPEAT " " +
SWAP 1 - SWAP
      END SWAP DROP
DUP SIZE ROT \->STR
DUP SIZE ROT SWAP -
2 / FLOOR 1 + SWAP
REPL
    \>>
  \->\|v
    \<< { } 2
      DO DUP Prm?
SIZE 1 ==
        \<< ROT SWAP
+ SWAP
        \>>
        \<< DROP
        \>> IFTE 1 +
      UNTIL OVER
SIZE DUP 4 DISP 200
==
      END
    \>>
  Bep
    \<< DUP TYPE 5 ==
      \<< EVAL
      \>>
      \<< 1 SWAP
      \>> IFTE \-> \Ge \GD
      \<< { { 20 15
.5 } { 100 20 .1 }
{ 2000 500 .02 } {
4000 1000 .005 } {
8000 10 .04 } } \GD
GET EVAL \-> a b c
        \<< RCLF -56
CF 1 \Ge
          START
RAND a * b + c BEEP
          NEXT STOF
        \>>
      \>>
    \>>
  \GSDAT
[[ 58 ]
 [ 102 ]
 [ 168 ]
 [ 240 ]
 [ 306 ]
 [ 287 ]
 [ 432 ]
 [ 258 ]
 [ 576 ]
 [ 487 ]
 [ 533 ]
 [ 780 ]
 [ 211 ]
 [ 912 ]
 [ 731 ]
 [ 1060 ]
 [ 841 ]
 [ 293 ]
 [ 1248 ]
 [ 668 ]
 [ 1049 ]
 [ 1099 ]
 [ 1151 ]
 [ 798 ]
 [ 1249 ]
 [ 1303 ]
 [ 1349 ]
 [ 1391 ]
 [ 1457 ]
 [ 1511 ]
 [ 1044 ]
 [ 541 ]
 [ 1104 ]
 [ 2280 ]
 [ 1180 ]
 [ 1807 ]
 [ 1849 ]
 [ 1915 ]
 [ 2620 ]
 [ 1350 ]
 [ 1374 ]
 [ 1410 ]
 [ 1446 ]
 [ 2215 ]
 [ 2269 ]
 [ 1542 ]
 [ 1584 ]
 [ 1620 ]
 [ 3300 ]
 [ 839 ]
 [ 3432 ]
 [ 2641 ]
 [ 887 ]
 [ 1818 ]
 [ 1848 ]
 [ 2825 ]
 [ 1920 ]
 [ 2931 ]
 [ 1988 ]
 [ 3041 ]
 [ 3085 ]
 [ 3139 ]
 [ 3193 ]
 [ 1087 ]
 [ 4384 ]
 [ 2226 ]
 [ 2252 ]
 [ 2304 ]
 [ 2334 ]
 [ 2368 ]
 [ 2394 ]
 [ 3653 ]
 [ 1229 ]]
  \GSPAR { 1 2 0 0
LINFIT }
  PPAR { (0,-657.6)
(73,4384) X 0 (0,0)
BAR Y }
END





----------- :: o
.---..-..-..-..-..-..-.  .  .-. .-.  .-..-..-..   .-.  
`| |'| || .` | >  /  \ \/ \/ / /   \ | .` || | ) /   \ 
 `-' `-'`-'`-' `-'    `. ^ .' `--^--'`-'`-'`-'' `--^--'
Join The BabyNous Cult : The Friendly Neighborhood Cult