OFFSET
1,2
COMMENTS
After a(19) which exceeds 10^7 but is still unknown, the sequence continues 18,24,34,a(23)=?,10,215,303,... - M. F. Hasler, May 16 2009
FORMULA
PROG
(Python)
from __future__ import division
from fractions import gcd
def A151413(n):
....if n <= 2:
........return n
....else:
........l1, l2, m, b = 2, 1, 1, {1, 2}
........for j in range(3, 10**9):
............i = m
............while True:
................if not i in b:
....................if i == n:
........................return j
....................l1, l2, m = i, l1, l1//gcd(l1, i)
....................b.add(i)
....................break
................i += m
........return "search limit reached." # Chai Wah Wu, Dec 09 2014
CROSSREFS
KEYWORD
nonn,more
AUTHOR
N. J. A. Sloane, May 16 2009
EXTENSIONS
a(13)-a(18) from Robert Gerbicz and M. F. Hasler, May 16 2009
STATUS
approved