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

Home > Numbers
Seven come eleven (Posted on 2010-12-11) Difficulty: 4 of 5
  A positive integer N fulfills the following demands:.
N is a 7 digit number.
N's digits can be arranged as seven distinct members of an arithmetic progression(either ascending or descending) .

N is a multiple of 11.

How many positive integers like N exist?
Evaluate the lowest and the highest N.
BONUS : How about 8 digits? Nine? All ten?
  Rem: It is D4 for fully explained and errorless P&P result,might be significantly lower for software solution.    

See The Solution Submitted by Ady TZIDON    
Rating: 4.0000 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
for 10 digits | Comment 2 of 13 |

DEFDBL A-Z

DECLARE SUB permute (a$)
CLS
a$ = "0123456789": h$ = a$
DO
  IF LEFT$(a$, 1) > "0" THEN
    v = VAL(a$)
    vm = v - 11 * INT(v / 11)
    IF vm = 0 THEN ct = ct + 1
  END IF
  permute a$
LOOP UNTIL a$ = h$
PRINT ct

finds

285120


  Posted by Charlie on 2010-12-11 15:28:45
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 (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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