Favorite number sequences?
Moderators: gmalivuk, Moderators General, Prelates
 King Author
 Posts: 736
 Joined: Sun Apr 12, 2009 12:30 pm UTC
 Location: Pennsylvania, USA
Favorite number sequences?
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 infinitelyscalable 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 noncumulative Experience Point system (i.e. your XP resets to 0 every time you level up).
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 infinitelyscalable 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 noncumulative 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 >_>
Re: Favorite number sequences?
EuclidMullin 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.
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
 gmalivuk
 GNU Terry Pratchett
 Posts: 25037
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: Favorite number sequences?
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.King Author wrote:So do the Triangular Numbers, which I just recently learned about, but those ones you have to manually add together
 King Author
 Posts: 736
 Joined: Sun Apr 12, 2009 12:30 pm UTC
 Location: Pennsylvania, USA
Re: Favorite number sequences?
gmalivuk wrote: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.King Author wrote:So do the Triangular Numbers, which I just recently learned about, but those ones you have to manually add together
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 constantlyaccumulating 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 higherlevel 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 leveltolevel 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 shallowlyincreasing 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 zeroout 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 firstpage 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 >_>
 gmalivuk
 GNU Terry Pratchett
 Posts: 25037
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: Favorite number sequences?
It probably says that triangular numbers are stupid easy to compute, so do the math your own self, you lazy bum.
 King Author
 Posts: 736
 Joined: Sun Apr 12, 2009 12:30 pm UTC
 Location: Pennsylvania, USA
Re: Favorite number sequences?
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 >_>
Re: Favorite number sequences?
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.
There's your list you were looking for. Took me slightly less than 15 minutes.
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
 King Author
 Posts: 736
 Joined: Sun Apr 12, 2009 12:30 pm UTC
 Location: Pennsylvania, USA
Re: Favorite number sequences?
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 afforementionedproblem of "with tabletop RPGs, it's better to use small, easytoworkwith 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 >_>
 MartianInvader
 Posts: 716
 Joined: Sat Oct 27, 2007 5:51 pm UTC
Re: Favorite number sequences?
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!
 Thesh
 Has the Brain Worms, In Case You Forgot.
 Posts: 5014
 Joined: Tue Jan 12, 2010 1:55 am UTC
 Location: Colorado
Re: Favorite number sequences?
Favorite sequences of numbers?
Code: Select all
f(x) = { 0; if x = 0, 1; if x = 1, 2 * f(x1)  f(x2) + 2; if x > 1
f(0),f(1),f(2),f(3),f(4),f(5),...
But I do and I don't want to care anymore.
If I close my eyes, would it spare me the sight of decay, corruption?
How we nurture destruction and everything that will doom us all.
If I close my eyes, would it spare me the sight of decay, corruption?
How we nurture destruction and everything that will doom us all.
Re: Favorite number sequences?
Thesh wrote:Favorite sequences of numbers?Code: Select all
f(x) = { 0; if x = 0, 1; if x = 1, 2 * f(x1)  f(x2) + 2; if x > 1
f(0),f(1),f(2),f(3),f(4),f(5),...
You’re such a square.
wee free kings
Re: Favorite number sequences?
f(n+1) = (n+2)f(n), f(0) = 1
 King Author
 Posts: 736
 Joined: Sun Apr 12, 2009 12:30 pm UTC
 Location: Pennsylvania, USA
Re: Favorite number sequences?
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 >_>
Re: Favorite number sequences?
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_(n1)+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
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?
Re: Favorite number sequences?
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,...
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,...
 gmalivuk
 GNU Terry Pratchett
 Posts: 25037
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: Favorite number sequences?
It is in the limit, with the ratio of successive terms approaching the golden ratio.King Author wrote:I specifically avoided using the term "exponential" to describe Fibonacci 'cause I wasn't sure if it was technically correct.
 King Author
 Posts: 736
 Joined: Sun Apr 12, 2009 12:30 pm UTC
 Location: Pennsylvania, USA
Re: Favorite number sequences?
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_(n1)+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:It is in the limit, with the ratio of successive terms approaching the golden ratio.King Author wrote:I specifically avoided using the term "exponential" to describe Fibonacci 'cause I wasn't sure if it was technically correct.
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 >_>
Re: Favorite number sequences?
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
Re: Favorite number sequences?
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 (1sqrt(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).
Re: Favorite number sequences?
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.
Re: Favorite number sequences?
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.)
wee free kings
Re: Favorite number sequences?
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:
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).
Spoiler:
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).
Re: Favorite number sequences?
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?

 Posts: 563
 Joined: Tue Jul 27, 2010 8:48 am UTC
Re: Favorite number sequences?
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.
Re: Favorite number sequences?
My favourite sequences are ones that can't be fully defined. For example, A(n) = A_{n}(n)+1 where A_{n} is the n^{th} 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!
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!
Who is online
Users browsing this forum: Bing [Bot] and 10 guests