Author Topic: Catalan Number  (Read 10926 times)

0 Members and 1 Guest are viewing this topic.

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Catalan Number
« Reply #15 on: February 21, 2011, 11:27:41 am »
To calculate bigger numbers, you could have the program simplify the expression before actually computing it.

Offline phenomist

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 132
  • Rating: +46/-3
    • View Profile
Re: Catalan Number
« Reply #16 on: February 21, 2011, 07:39:28 pm »
BTW, on the subject of negative Fibonacci numbers, they do exist. Just reverse the recursion (F_n+F_{n+1} = F_{n+2}) => (F_{n-2} = F_n-F_{n-1}) and it works.

(Though they aren't terribly interesting: F_{-i} = -F_i * (-1)^i, so the negativeth Fibonacci number is either the negation of or equal to the positiveth Fibonacci number)
Level Designer for Graviter

[Disclaimer: I can't program for my life.]

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Catalan Number
« Reply #17 on: February 21, 2011, 07:51:15 pm »
Of course phenomist would know about this stuff.
In-progress: Graviter (...)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Catalan Number
« Reply #18 on: February 24, 2011, 12:31:26 pm »
Of course phenomist would know about this stuff.

lol

BTW, on the subject of negative Fibonacci numbers, they do exist. Just reverse the recursion (F_n+F_{n+1} = F_{n+2}) => (F_{n-2} = F_n-F_{n-1}) and it works.

(Though they aren't terribly interesting: F_{-i} = -F_i * (-1)^i, so the negativeth Fibonacci number is either the negation of or equal to the positiveth Fibonacci number)

Yeah, there's not much interest there, but thanks :D

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Catalan Number
« Reply #19 on: February 26, 2011, 02:18:18 am »
I know I'm abusing this Catalan Number thing, but it's great to learn new things about languages, so I made it Java GUI using Awt and Swing.