Favorite number sequences?

For the discussion of math. Duh.

Moderators: gmalivuk, Prelates, Moderators General

Favorite number sequences?

Postby King Author » Thu Apr 05, 2012 4:10 pm UTC

What's your favorite number sequence? I know it's an odd question, but go with it. And tell us why it's your favorite -- usefulness, quirkiness, beauty?

I don't know many number sequences, since I'm a layperson, not a smarty, but I'm partial to the Fibonacci sequence because I'm an amateur videogame designer and it makes for a quick, useful and infinitely-scalable Experience Points table. So do the Triangular Numbers, which I just recently learned about, but those ones you have to manually add together, unless you use a non-cumulative Experience Point system (i.e. your XP resets to 0 every time you level up).
I have signitures disabled. If you do, too...you can't read this, so nevermind >_>
User avatar
King Author
 
Posts: 661
Joined: Sun Apr 12, 2009 12:30 pm UTC
Location: Pennsylvania, USA

Re: Favorite number sequences?

Postby Snark » Thu Apr 05, 2012 7:54 pm UTC

Euclid-Mullin sequence

Because
1. It involves primes.
2. There's some unanswered questions about it (whether it contains every prime)
3. It's not strictly increasing like most sequences in number theory.
Dashboard Confessional wrote:I want to give you whatever you need. What is it you need? Is it within me?


Avatar by Matt
User avatar
Snark
 
Posts: 422
Joined: Mon Feb 27, 2012 3:22 pm UTC
Location: Washington D.C.

Re: Favorite number sequences?

Postby gmalivuk » Thu Apr 05, 2012 10:12 pm UTC

King Author wrote:So do the Triangular Numbers, which I just recently learned about, but those ones you have to manually add together
What do you mean by this? Can't you just check the total XP against the triangular numbers like you would the Fibonacci numbers? Spreadsheets I've made for D&D 3 and 3.5 characters basically did just that, since those editions required 1000n points to move from level n to level n+1.
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(cis male/he/him/his)
User avatar
gmalivuk
A debonaire peeing style
 
Posts: 22400
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There

Re: Favorite number sequences?

Postby King Author » Thu Apr 05, 2012 11:09 pm UTC

gmalivuk wrote:
King Author wrote:So do the Triangular Numbers, which I just recently learned about, but those ones you have to manually add together
What do you mean by this? Can't you just check the total XP against the triangular numbers like you would the Fibonacci numbers? Spreadsheets I've made for D&D 3 and 3.5 characters basically did just that, since those editions required 1000n points to move from level n to level n+1.

Yes, technically I could treat the Triangular XP like Fibonacci XP (yikes, I think I just broached the nerdiness density limit), but they scale differently so they need to be treated differently; every couple of iterations in the sequence, the Fibonacci numbers add an order of magnitude, whereas the Triangular numbers stay the same number of digits for long stretches. Like, Fibonacci 50 is 12,586,269,025. Triangle 50 is 1275. Fibonacci 100 is up to 354,224,848,179,261,915,075 which is ridiculously higher than Fibonacci 50. In contrast, Triangle 100 is 5050; not even quadruple Triangle 50.

So if the characters in the game in question have a cumulative XP stat, Fibonacci works better because each next number in the sequence is just the next milestone for your constantly-accumulating XP. And more importantly, the rate at which the Fibonacci numbers scale is perfectly suited to something like cumulative XP progression; assuming that higher and higher-level monsters/whatever give you progressively higher amounts of XP, you'll never level up too fast or too slow.

With the Triangular numbers, however, because each number in the sequence is so close to the number before and after it, if you had cumulative XP, you'd level up ridiculously fast. Take Fib 50 and Tri 50 again -- to get from Fib 50 to Fib 51 you need to gain 7,778,742,049 additional XP. To get from Fib 51 to Fib 52, you need an additional 12,586,269,025 XP -- a significant increase from the last level-to-level amount. By contrast, to get from Tri 50 to Tri 51 you need, obviously, 51 additional XP. To get from 51 to 52, you need an additional 52; the "XP to Next Level" using Triangular numbers is always only one more than you needed last time, a very linear, very shallowly-increasing amount. When using Fibonacci numbers, on the other hand, the "XP to Next Level" starts jumping up by larger leaps and bounds the higher level you get.

So what I was saying was, if you want to use Triangular numbers (which I highly recommend for tabletop RPGs where humans are dealing with the numbers -- Fibonacci is better for computer and videogames where the electronic brain is doing all the maths), it's a good idea to zero-out XP after every level up. Such that, going back to the earlier example, to get from Level 50 to Level 51 you'd need 1,326 XP (rather than 51). To get from 51 to 52, you'd need an additional 1,378 (rather than 52). And again, every time you level up, your XP is reset to zero and you have a new goal to shoot for, rather than your XP just being a running total of all XP you've ever obtained.

By the way -- what's it say that you can google "first 1000 fibonacci numbers" and get a first-page hit, while googling "first 1000 triangular numbers" doesn't get you what you're looking for?
I have signitures disabled. If you do, too...you can't read this, so nevermind >_>
User avatar
King Author
 
Posts: 661
Joined: Sun Apr 12, 2009 12:30 pm UTC
Location: Pennsylvania, USA

Re: Favorite number sequences?

Postby gmalivuk » Thu Apr 05, 2012 11:22 pm UTC

It probably says that triangular numbers are stupid easy to compute, so do the math your own self, you lazy bum.
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(cis male/he/him/his)
User avatar
gmalivuk
A debonaire peeing style
 
Posts: 22400
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There

Re: Favorite number sequences?

Postby King Author » Thu Apr 05, 2012 11:33 pm UTC

gmalivuk wrote:It probably says that triangular numbers are stupid easy to compute, so do the math your own self, you lazy bum.

That's what I figured :p

Actually, I could probably easily write a program (in anything, really, even in RPG Maker) to do it for me. Shouldn't take all of fifteen minutes. I'm not going to do it, of course, but I could.
I have signitures disabled. If you do, too...you can't read this, so nevermind >_>
User avatar
King Author
 
Posts: 661
Joined: Sun Apr 12, 2009 12:30 pm UTC
Location: Pennsylvania, USA

Re: Favorite number sequences?

Postby Snark » Thu Apr 05, 2012 11:34 pm UTC

I don't think it matters much whether you use Fibb or Triangular numbers for xp as long as your monsters xp is proportional to the same numbers.

Code: Select all
for(i=1; i<=1000; i++)
  printf("%d\n", i*(i+1)/2);


There's your list you were looking for. Took me slightly less than 15 minutes. :)
Dashboard Confessional wrote:I want to give you whatever you need. What is it you need? Is it within me?


Avatar by Matt
User avatar
Snark
 
Posts: 422
Joined: Mon Feb 27, 2012 3:22 pm UTC
Location: Washington D.C.

Re: Favorite number sequences?

Postby King Author » Thu Apr 05, 2012 11:43 pm UTC

Snark wrote:I don't think it matters much whether you use Fibb or Triangular numbers for xp as long as your monsters xp is proportional to the same numbers.

True. However, in game design, which is typically a collaborative process, it's more likely that I have to fit something to something someone else has already made and either can't or is unwilling to change. Not to mention the afforementioned-problem of "with tabletop RPGs, it's better to use small, easy-to-work-with numbers, since regular humans will be doing all the maths."

Snark wrote:
Code: Select all
for(i=1; i<=1000; i++)
  printf("%d\n", i*(i+1)/2);


There's your list you were looking for. Took me slightly less than 15 minutes. :)

I'm a beginning coder, jerk :p Woulda taken me fifteen minutes T3T
I have signitures disabled. If you do, too...you can't read this, so nevermind >_>
User avatar
King Author
 
Posts: 661
Joined: Sun Apr 12, 2009 12:30 pm UTC
Location: Pennsylvania, USA

Re: Favorite number sequences?

Postby MartianInvader » Fri Apr 06, 2012 1:12 am UTC

You know that even if you reset to zero each time, you'll still level up much faster with triangular numbers, right? It's the difference between cubic and exponential growth, I believe.
Let's have a fervent argument, mostly over semantics, where we all claim the burden of proof is on the other side!
User avatar
MartianInvader
 
Posts: 685
Joined: Sat Oct 27, 2007 5:51 pm UTC

Re: Favorite number sequences?

Postby Thesh » Fri Apr 06, 2012 3:32 am UTC

Favorite sequences of numbers?
Code: Select all
f(x) = { 0; if x = 0, 1; if x = 1, 2 * f(x-1) - f(x-2) + 2; if x > 1

f(0),f(1),f(2),f(3),f(4),f(5),...
Deceiving appearance, they're dressed up as gods.
Fake that they care, their conscience is lost.
Denial their craft and riots our goal.
They lead those who follow and break those who fall.
User avatar
Thesh
Has the Brain Worms, In Case You Forgot.
 
Posts: 3688
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: California, Southern USA

Re: Favorite number sequences?

Postby Qaanol » Fri Apr 06, 2012 5:34 am UTC

Thesh wrote:Favorite sequences of numbers?
Code: Select all
f(x) = { 0; if x = 0, 1; if x = 1, 2 * f(x-1) - f(x-2) + 2; if x > 1

f(0),f(1),f(2),f(3),f(4),f(5),...

You’re such a square.
Small Government Liberal
User avatar
Qaanol
 
Posts: 2555
Joined: Sat May 09, 2009 11:55 pm UTC

Re: Favorite number sequences?

Postby Timefly » Fri Apr 06, 2012 10:22 am UTC

f(n+1) = (n+2)-f(n), f(0) = 1
Timefly
 
Posts: 56
Joined: Sun Nov 14, 2010 7:30 pm UTC

Re: Favorite number sequences?

Postby King Author » Fri Apr 06, 2012 11:07 am UTC

MartianInvader wrote:You know that even if you reset to zero each time, you'll still level up much faster with triangular numbers, right? It's the difference between cubic and exponential growth, I believe.

Yes, Triangular XP still gives faster, more regular levelups, but if you reset to zero, it's a lot less severe than if you don't. To get from Level 49 to Level 50, you'd need 1,275 XP rather than 50 XP. Although as gmalivuk said, if you adjust the XP giveouts, you could make it as slow as you want.

I specifically avoided using the term "exponential" to describe Fibonacci 'cause I wasn't sure if it was technically correct.

*looks around*

Anyone? Is it?
I have signitures disabled. If you do, too...you can't read this, so nevermind >_>
User avatar
King Author
 
Posts: 661
Joined: Sun Apr 12, 2009 12:30 pm UTC
Location: Pennsylvania, USA

Re: Favorite number sequences?

Postby nxcho » Fri Apr 06, 2012 11:16 am UTC

My favorite sequence in the sense that it is the one I use the most is clearly the sequence of natural numbers (a_0 = 0, a_n = a_(n-1)+1). It is very useful for example counting things and it is easy to remember.
On the less trivial side of things I like sequences with a nice geometrical interpretation, like https://oeis.org/A089187
What about the kalman schnitzel?
User avatar
nxcho
 
Posts: 12
Joined: Wed Sep 30, 2009 9:12 am UTC

Re: Favorite number sequences?

Postby ElCarl » Fri Apr 06, 2012 12:05 pm UTC

Probably the fibonacci sequence...
So many interesting things about it :)
If you write down the sequence, then write down the differences between the numbers below it, you get the fibonacci sequence back out again!
And if you keep doing it to a long enough starting list, you begin to get the sequence coming out again on the left, except with alternating negatives and positive values.

i.e. you get:

...-21,13,-8,5,-3,2,-1,1,0,1,1,2,3,5,8,13,...
ElCarl
 
Posts: 26
Joined: Sat Aug 06, 2011 6:23 pm UTC
Location: London, UK

Re: Favorite number sequences?

Postby gmalivuk » Fri Apr 06, 2012 1:46 pm UTC

King Author wrote:I specifically avoided using the term "exponential" to describe Fibonacci 'cause I wasn't sure if it was technically correct.
It is in the limit, with the ratio of successive terms approaching the golden ratio.
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(cis male/he/him/his)
User avatar
gmalivuk
A debonaire peeing style
 
Posts: 22400
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There

Re: Favorite number sequences?

Postby King Author » Fri Apr 06, 2012 2:46 pm UTC

nxcho wrote:My favorite sequence in the sense that it is the one I use the most is clearly the sequence of natural numbers (a_0 = 0, a_n = a_(n-1)+1). It is very useful for example counting things and it is easy to remember.
On the less trivial side of things I like sequences with a nice geometrical interpretation, like https://oeis.org/A089187

Ooh, that second one's pretty cool.
...
>_>
*googles "convex lattice polygon"*
<_<

ElCarl wrote:Probably the fibonacci sequence...
So many interesting things about it :)
If you write down the sequence, then write down the differences between the numbers below it, you get the fibonacci sequence back out again!
And if you keep doing it to a long enough starting list, you begin to get the sequence coming out again on the left, except with alternating negatives and positive values.

i.e. you get:

...-21,13,-8,5,-3,2,-1,1,0,1,1,2,3,5,8,13,...

Huh, never knew that. Neat. Did you know that if you use adjacent Fibonacci numbers in architecture, the result typically "looks" porportional and pleasing to the human eye? By "adjacent Fibonacci numbers" I mean if you want to build a rectangular room, if it's 13 meters lengthwise and 8 meters otherwise, for example. Of if you're building a step design, have the first be 3 feet, then 5, then 8, then 13, etc.

gmalivuk wrote:
King Author wrote:I specifically avoided using the term "exponential" to describe Fibonacci 'cause I wasn't sure if it was technically correct.
It is in the limit, with the ratio of successive terms approaching the golden ratio.

Ah, alright. Thanks.

I'm always wary of calling something "exponential" to simply mean "goes up a whole lot," because I do that sometimes in game design circles when talking about a given mechanic, and some mathy usually chews me out. "That's not exponential! It doesn't involve an exponent!"
I have signitures disabled. If you do, too...you can't read this, so nevermind >_>
User avatar
King Author
 
Posts: 661
Joined: Sun Apr 12, 2009 12:30 pm UTC
Location: Pennsylvania, USA

Re: Favorite number sequences?

Postby ElCarl » Fri Apr 06, 2012 2:59 pm UTC

King Author wrote:Huh, never knew that. Neat. Did you know that if you use adjacent Fibonacci numbers in architecture, the result typically "looks" porportional and pleasing to the human eye? By "adjacent Fibonacci numbers" I mean if you want to build a rectangular room, if it's 13 meters lengthwise and 8 meters otherwise, for example. Of if you're building a step design, have the first be 3 feet, then 5, then 8, then 13, etc.


Well, I knew that successive terms of the sequence approximate the golden ratio, and that that's used a lot as an aesthetically pleasing ratio - another one of those weird but interesting things about the sequence :)
ElCarl
 
Posts: 26
Joined: Sat Aug 06, 2011 6:23 pm UTC
Location: London, UK

Re: Favorite number sequences?

Postby letterX » Fri Apr 06, 2012 3:57 pm UTC

King Author wrote:I'm always wary of calling something "exponential" to simply mean "goes up a whole lot," because I do that sometimes in game design circles when talking about a given mechanic, and some mathy usually chews me out. "That's not exponential! It doesn't involve an exponent!"


I also tend to get annoyed at people calling merely big things exponential. However, in this case it actually is exponential.

In case you haven't seen it before, there's actually a closed form expression for the nth Fibbonacci number, namely F_n = (phi^n - psi^n)/sqrt(5), where phi is the golden ratio, (1+sqrt(5))/2 and psi is (1-sqrt(5))/2. Since the absolute value of phi is bigger than that of psi, we have that F_n is O(phi^n) (which is computer science speak for saying that the fibbonacci numbers have the same "order of growth" as phi^n, which really is exponential).

On the other hand, it's been pointed out that the nth triangular number is n(n+1)/2 = (n^2 + n)/2. So this is basically n^2 (by which I mean it's O(n^2)), so we'd call it quadratic growth.

Also, this has been mentioned several times already but I'll just spell it out concretely: adding up the first n triangular numbers is actually a quantity called the nth tetrahedral number. It also has a closed form expression, which is n(n+1)(n+2)/6 which, by expanding out that product, has a leading term of n^3/6, so we call it cubic growth or O(n^3).
letterX
 
Posts: 527
Joined: Fri Feb 22, 2008 4:00 am UTC
Location: Ithaca, NY

Re: Favorite number sequences?

Postby Coding » Fri Apr 06, 2012 11:09 pm UTC

Fibonacci and relatives (tribonacci, tetranacci, etc.) are pretty cool. I am also a bit partial to sequences that I "discovered" on my own before reading about them or anything, so I like the free polyomino sequence and the triangular numbers.
User avatar
Coding
 
Posts: 47
Joined: Thu Sep 15, 2011 6:59 pm UTC

Re: Favorite number sequences?

Postby Qaanol » Fri Apr 06, 2012 11:38 pm UTC

I’m going with the Bernoulli numbers, because they’re pretty deeply connected to prime number theory. (Also because I discovered them on my own before learning about them—and to this day have never been formally taught about them.)
Small Government Liberal
User avatar
Qaanol
 
Posts: 2555
Joined: Sat May 09, 2009 11:55 pm UTC

Re: Favorite number sequences?

Postby cyanyoshi » Sun Apr 08, 2012 5:27 am UTC

I am myself quite partial to fractal sequences such as the sequence a(n) that you get when the digits of the nonnegative integer n (in base 2, in this case) are added together:
Spoiler:
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,...

In particular, I find it cool that the sequences a(2n), a(4n), a(8n), etc. are the exact same as a(n). This can be extended without much difficulty as a function of all nonnegative real numbers that have a terminating binary representation, but you have to hunt elsewhere for a function of negative numbers. You may then want to try the sequence of adding up the digits in negabinary or balanced ternary (still interesting).
post count unintentional
cyanyoshi
 
Posts: 133
Joined: Thu Sep 23, 2010 3:30 am UTC

Re: Favorite number sequences?

Postby antonfire » Sun Apr 08, 2012 10:06 am UTC

I like the look and say sequence, mostly because how fast it grows is hilarious.
Jerry Bona wrote:The Axiom of Choice is obviously true; the Well Ordering Principle is obviously false; and who can tell about Zorn's Lemma?
User avatar
antonfire
 
Posts: 1771
Joined: Thu Apr 05, 2007 7:31 pm UTC

Re: Favorite number sequences?

Postby tomtom2357 » Wed Apr 11, 2012 11:57 am UTC

I like it too, because when it is started with most different numbers the growth rate is an algebraic number of degree 71.
I have discovered a truly marvelous proof of this, which this margin is too narrow to contain.
tomtom2357
 
Posts: 556
Joined: Tue Jul 27, 2010 8:48 am UTC

Re: Favorite number sequences?

Postby MrDrake » Wed Apr 11, 2012 12:59 pm UTC

My favourite sequences are ones that can't be fully defined. For example, A(n) = An(n)+1 where An is the nth sequence in the OEIS.

A = 2, 3, 2, 1, 3, 4, 1, 7, 7, 5, ...

Ironically, this sequence is A102288 (https://oeis.org/A102288), which means that A(102288) is undefined!
User avatar
MrDrake
 
Posts: 7
Joined: Wed Apr 11, 2012 12:20 pm UTC
Location: Sydney, NSW, Australia


Return to Mathematics

Who is online

Users browsing this forum: No registered users and 5 guests