rand111
rand111

Reputation: 25

How to find sequence formula

I am looking for a sequence formula. The sequence is {1,5,18, 56,160,432}.

I tried using wolframs mathematica - FindSequenceFunction and FindGeneratingFunction. First one did not even give me a function, second one gave me 1-n/(1-2n)^3 which i dont see how this can be right. Maybe I dont understand mathematica properly. Thanks for help

Upvotes: 2

Views: 402

Answers (2)

Chris Degnen
Chris Degnen

Reputation: 8655

fn[x_] := Evaluate[
  FindGeneratingFunction[{1, 5, 18, 56, 160, 432}, x]]

Series[fn[x], {x, 0, 5}]

1 + 5 x + 18 x^2 + 56 x^3 + 160 x^4 + 432 x^5 + O[x]^6

FindSequenceFunction needs another couple of terms before it nails it

FindSequenceFunction[{1, 5, 18, 56, 160, 432, 1120, 2816}, n]

2^(-3 + n) n (3 + n)

Same as OEIS A001793

Upvotes: 1

Bill
Bill

Reputation: 3977

Go to

https://oeis.org/

and enter

1,5,18,56,160,432

and tap Search

and in a fraction of a second it finds that you are not the first person looking at that sequence, that sequence has actually shown up in two different contexts.

Upvotes: 0

Related Questions