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

Home > Numbers > Sequences
Simple Sequence (Posted on 2007-05-07) Difficulty: 2 of 5
The sequence:

1, 3, 7, 13, 21, ...

What is the 600th member of the series?

What member, above the first, with fewer than 5 digits, is a perfect cube?

What member is a 5-digit palindrome that can also be read as a binary number?

What's the smaller of the two consecutive members that are 1000 apart?

  Submitted by Charlie    
Rating: 4.0000 (2 votes)
Solution: (Hide)
The sequence formula is n^2 - n + 1.

The 600th is 359,401.

343 (the 19th member) is the perfect cube.

10101 (the 101st member) is the palindrome.

The 500th member is the lower of the two that differ by 1000, and is 249,501.

The program uses increasing first differences, rather than the formula:

diff = 2: n = 1
DO
 ct = ct + 1
 IF ct = 600 THEN PRINT "600th="; n
 tst = INT(n ^ (1 / 3) + .5): tcu = tst * tst * tst
 IF tcu = n THEN PRINT "cube "; n; ct
 ns$ = LTRIM$(STR$(n))
 IF LEN(ns$) = 5 THEN
   IF LEFT$(ns$, 1) = RIGHT$(ns$, 1) AND MID$(ns$, 2, 1) = MID$(ns$, 4, 1) THEN
     good = 1
     FOR i = 1 TO 3
      IF INSTR("01", MID$(ns$, i, 1)) = 0 THEN good = 0
     NEXT
     IF good THEN
       PRINT "bin pal="; n; ct
     END IF
   END IF
 END IF
 IF diff = 1000 THEN PRINT "lower="; n; ct

 n = n + diff
 diff = diff + 2
LOOP UNTIL ct > 600 AND diff > 1000

which results in:

cube  1  1
cube  343  19
bin pal= 10101  101
lower= 249501  500
600th= 359401

From Enigma No. 1436 by Adrian Somerfield, New Scientist, 31 March 2007

Comments: ( You must be logged in to post comments.)
  Subject Author Date
SolutionProblem SolutionK Sengupta2007-05-09 11:59:40
re: Please explainCharlie2007-05-08 12:38:19
Please explainbrianjn2007-05-08 05:03:24
re: No SubjectGeorge2007-05-07 21:42:05
SolutionNo SubjectDej Mar2007-05-07 20:51:19
SolutionSolutionatheron2007-05-07 10:40:57
Teasebrianjn2007-05-07 09:35:54
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 (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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