Author Topic: [TI-83] Various Number Theory Things  (Read 4732 times)

0 Members and 1 Guest are viewing this topic.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
[TI-83] Various Number Theory Things
« on: May 10, 2006, 09:02:58 pm »
TI-83 lacks a few things helpful for Number Theory, so I added them in during a free today, thought they may be helpful to others:

prgmMODULUS
Used to find even divisibility (VERY HELPFUL!).  This is a requirement for other programs below.
Code: [Select]
:If F:Then
:E/F->G
:F*(G-int(G))->G
:If G<0:G+F->G
:Else
:0->G
:End
Result: 0 F divides E evenly (ie: F = 2, E = 10).
remainder otherwise.

prgmSUMFACTS
Sums all factors (divisors) of a given number, 1 and the number inclusive.  Useful in finding k-perfect numbers.
Code: [Select]
:Input "NUM=",A
:0->K
:For(I,1,A+1)
:A->E
:I->F
:prgmMODULUS
:If G=0
:K+I->K
:End
:Disp K

prgmFACTOR
Displays all factors of a number, 1 and number exclusive
Code: [Select]
:Input "NUM=",A
:0->K
:For(I,1,A+1)
:A->E
:I->F
:prgmMODULUS
:If G=0
:Disp I
:End

prgmPF
Launcher for prgmPRMEFACT
Code: [Select]
:ClrHome
:Input "NUM=",A
:prgmPRMEFACT

prgmPRMEFACT
Displays the prime factorization (kind of) of a number
Code: [Select]
:2->I
:While I<A
:A->E
:I->F
:prgmMODULUS
:If G=0:Then
:Disp I
:A/I->A
:Else
:I+1->I
:End
:End
:Disp A

Offline deadly7

  • 42
  • Moderator
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: [TI-83] Various Number Theory Things
« Reply #1 on: May 11, 2006, 01:36:24 am »
Neat.  I like the last one the most.

Why are you using an 83?  They're terrible calculators.
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Offline Sidoh

  • Moderator
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: [TI-83] Various Number Theory Things
« Reply #2 on: May 11, 2006, 03:19:36 am »
Neat.  I like the last one the most.

Why are you using an 83?  They're terrible calculators.

...

Nice, rabbit.  I doubt I'll ever have much use to do number theory on a graphing calculator (with the stuff I've done, I've used my computer), but I'll keep them in mind. :P

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: [TI-83] Various Number Theory Things
« Reply #3 on: May 11, 2006, 06:30:36 am »
Neat.  I like the last one the most.

Why are you using an 83?  They're terrible calculators.
We haven't been allowed 83's in NT, we've been using TI-06's all year (the blue ones for like, 3rd graders), but even those have a mod button (INT/) :\

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [TI-83] Various Number Theory Things
« Reply #4 on: May 11, 2006, 09:25:50 pm »
I don't have my TI-83 handy at the moment (it's at school) but I could have sworn there was a mod function in the catalog.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: [TI-83] Various Number Theory Things
« Reply #5 on: May 11, 2006, 09:30:08 pm »
I got to use an 89 in college calc.  :D
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: [TI-83] Various Number Theory Things
« Reply #6 on: May 12, 2006, 06:44:33 am »
Yeah.  Sang (a Korean, no doubt!) has an 89 and is in our class.  The 89 is what inspired me..

Offline Nate

  • Full Member
  • ***
  • Posts: 425
  • You all suck
    • View Profile
Re: [TI-83] Various Number Theory Things
« Reply #7 on: May 12, 2006, 08:22:55 pm »
My friend has an 89...so cheap

Offline deadly7

  • 42
  • Moderator
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: [TI-83] Various Number Theory Things
« Reply #8 on: May 13, 2006, 02:33:45 pm »
I have an 86 and I can use my brother's 89 whenever I want. :D!
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine