|
|
A151413
|
|
Index at which n occurs in A160256, or -1 if n never occurs.
|
|
3
|
|
|
1, 2, 3, 4, 14, 5, 20, 6, 7, 12, 32, 11, 301, 22, 16, 8, 1065, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
(Python)
from __future__ import division
from fractions import gcd
....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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|