All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Odd Digits 2 Differ Adjacently (Posted on 2008-09-22) Difficulty: 3 of 5
Consider all possible 1000 digit positive base 10 integers all of whose digits are odd. For how many of these integers, do each pair of adjacent digits differ precisely by 2 ?

Note: Try to solve this problem analytically, although computer program/ spreadsheet solutions are welcome.

  Submitted by K Sengupta    
Rating: 4.0000 (1 votes)
Solution: (Hide)
Praneeth has submitted a solution in this location.

We will extend this to n-digit positive decimal (base 10) integers in general having the desired property, and denote:

E_n = the number of such n-digit numbers with last digit 1 or 9, and: :

F_n = the number of such n- digit numbers with last digit 3 or 7 :

G_n = the number of such n-digit numbers with last digit 5

Then, we must have: :

E_(n+1) = F_n; :

F_(n+1) = 2* G_n + E_n, and: :

G_(n+1) = F_n :

Accordingly F_(n+2) = 2*G_(n+1) + E_(n+1) = 2*F_n + F_n = 3*F_n :

Evidently, F_1 = 2(3, 7), and F_2 = 4(13, 53, 57, 97) :

Accordingly, we must have: :

F_(2n) = 4*3^(n-1); F_(2n-1) = 2*3^(n-1). :

Therefore, E_(2n) = G_(2n) = 2*3^(n-1), and consequently: :

E_(2n) + F_(2n) + G_(2n) = 8*3^(n-1) :

Substituting n= 500, it is indeed verified that the required number of 1000-digit positive integers is indeed 8*3499 as the desired result..

---------------------------------------------------

In a similar manner, we will obtain the total number of n-digit positive integers having the desired property as :

14*3(n-3)/2, whenever n is odd, which has been pointed out by Dej Mar.

---------------------------------------------------------------------

Dej Mar has given the required number of n-digit positive integers as:

(8 + 6*(x mod 2)) * 3([x/2] - 1), such that x > 1, and this will hold regardless of whether n is odd or even.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
SolutionSolutionPraneeth2008-10-07 07:17:48
re: SolutionCharlie2008-09-23 10:33:15
SolutionSolutionDej Mar2008-09-23 02:58:22
Solutionre: computer-aided solutionCharlie2008-09-22 17:47:13
Solutioncomputer-aided solutionCharlie2008-09-22 15:00:34
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2021 by Animus Pactum Consulting. All rights reserved. Privacy Information