# A tough one

lawgin
lawgin
Can you find the next number in this sequence?

1,2,6,12,60,60,420,840,...

Joined: April 5th, 2005, 9:24 pm
is that each new number is the previous number multiplied by something. The factors are:

2, 3, 2, 5, 1, 7, 2

but there doesn't seem to be any obvious consistent pattern in those factors. I'll look at it more later.

Regards,
Michael

Joined: June 24th, 2005, 9:57 pm
Can you find the next number in this sequence?

1,2,6,12,60,60,420,840,...
If it wasn't for that 1, I'd be 100% certain it had SOMETHING to do with prime numbers...or Fibonacci numbers and their mutual friend the golden ratio.

I'll certainly be excited to see the solution. I love things like this! ^_^
Last edited by rpgfan3233 on June 11th, 2011, 8:24 pm, edited 1 time in total.

lawgin
lawgin
is that each new number is the previous number multiplied by something. The factors are:

2, 3, 2, 5, 1, 7, 2

but there doesn't seem to be any obvious consistent pattern in those factors. I'll look at it more later.

Regards,
Michael
It is not a geometric or an arithmetic progression.

lawgin
lawgin
If it wasn't for that 1, I'd be 100% certain it had SOMETHING to do with prime numbers...or Fibonacci numbers and their mutual friend the golden ratio.

I'll certainly be excited to see the solution. I love things like this! ^_^
It has nothing to do with primes or Fibonacci's unless something is hidden in there that I don't see. I will say that every number in the series is completely determined by its position. So determining the 20th number in the series is possible without knowing any of the previous members.

qbguy
qbguy
Can you find the next number in this sequence?

1,2,6,12,60,60,420,840,...
(define (lawgin x) (apply lcm (iota x 1)))

1 ]=> (map lawgin (iota 20 1))

;Value: (1 2 6 12 60 60 420 840 2520 2520 27720 27720 360360 360360 360360 720720 12252240 12252240 232792560 232792560)

Joined: February 2nd, 2006, 10:38 pm
Keep you ego in your pants!

lawgin
lawgin
(define (lawgin x) (apply lcm (iota x 1)))

1 ]=> (map lawgin (iota 20 1))

;Value: (1 2 6 12 60 60 420 840 2520 2520 27720 27720 360360 360360 360360 720720 12252240 12252240 232792560 232792560)
The ever obtuse and smug qbguy did get the correct answer, to his credit.

Each number is the least common multiple according to it's position in the sequence or, stated differently, each number is the smallest integer which is evenly divisible by all the integers up to it's position in the sequence.

1, 2, 6, 12, 60, 60, 420, 840, 2520

1 is the smallest integer evenly divisible by 1
2 is the smallest integer evenly divisible by 1 and 2
6 is the smallest integer evenly divisible by 1, 2, and 3
12 is the smallest integer evenly divisible by 1, 2, 3, and 4
etc.

Below is the code I used to produce the sequence, though it craps out after 22 terms due to an overflow.

CLS
DEFLNG A
DO
p = p + 1
DO
a = a + 1
IF p > 4 THEN a = a + 9
FOR b = 2 TO p
IF a MOD b <> 0 THEN EXIT FOR
NEXT
IF b = p + 1 THEN
PRINT a;
a = 0
EXIT DO
END IF
LOOP
LOOP

Joined: February 2nd, 2006, 10:38 pm
NO FAIR!

qbguy
qbguy
DEFLNG A-Z
PRINT 1, 1
CUR = 1
n = 2
tomato:
IF n > 22 THEN END
CUR = CUR * (n / GCD((CUR), (n)))
PRINT n, CUR
n = n + 1
GOTO tomato

FUNCTION GCD (A, B)
potato:
IF B = 0 THEN GCD = A: EXIT FUNCTION
TMP = A MOD B
A = B
B = TMP
GOTO potato
END FUNCTION