Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

n-digit numbers created using digits 5 and 9, where no four identical digits stand side by side.

Posted on 2015-02-12
2
Medium Priority
?
142 Views
Last Modified: 2015-02-12
How many n-digit numbers can be created using only digits 5 and 9, where no four identical digits stand side by side?
0
Comment
Question by:Nusrat Nuriyev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 2000 total points
ID: 40606194
a[1] = 2
a[2] = 4
a[3] = 8
a[n] = a[n - 1] + a[n - 2] + a[n - 3]
https://oeis.org/A135491
0
 

Author Comment

by:Nusrat Nuriyev
ID: 40606261
ozo, also, this a[n]=a[n-1]+a[n-2]+a[n-3] gives us the n-digit numbers which can be created using only digits 5 and 9, where no three ones stand side by side. (but this does not mentioned in OEIS)

Could you explain why this sequence solves my original question? For better understanding.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Iteration: Iteration is repetition of a process. A student who goes to school repeats the process of going to school everyday until graduation. We go to grocery store at least once or twice a month to buy products. We repeat this process every mont…
When there is a disconnect between the intentions of their creator and the recipient, when algorithms go awry, they can have disastrous consequences.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question