login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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
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
A160218(n) = a(A000040(n)), conjectured. - M. F. Hasler, May 16 2009
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
Sequence in context: A123215 A051855 A058070 * A031241 A064958 A067177
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