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
104 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 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Okay. So what exactly is the problem here? How often have we come across situations where we need to know if two strings are 'similar' but not necessarily the same? I have, plenty of times. Until recently, I thought any functionality like that wo…
Article by: Nadia
Suppose you use Uber application as a rider and you request a ride to go from one place to another. Your driver just arrived at the parking lot of your place. The only thing you know about the ride is the license plate number. How do you find your U…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

696 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