Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #12 Sep 26 2015 01:12:16
%S 1,2,3,4,14,5,20,6,7,12,32,11,301,22,16,8,1065,9
%N Index at which n occurs in A160256, or -1 if n never occurs.
%C 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
%F A160218(n) = a(A000040(n)), conjectured. - _M. F. Hasler_, May 16 2009
%o (Python)
%o from __future__ import division
%o from fractions import gcd
%o def A151413(n):
%o ....if n <= 2:
%o ........return n
%o ....else:
%o ........l1, l2, m, b = 2, 1, 1, {1,2}
%o ........for j in range(3,10**9):
%o ............i = m
%o ............while True:
%o ................if not i in b:
%o ....................if i == n:
%o ........................return j
%o ....................l1, l2, m = i, l1, l1//gcd(l1,i)
%o ....................b.add(i)
%o ....................break
%o ................i += m
%o ........return "search limit reached." # _Chai Wah Wu_, Dec 09 2014
%Y Cf. A160256, A160218.
%K nonn,more
%O 1,2
%A _N. J. A. Sloane_, May 16 2009
%E a(13)-a(18) from _Robert Gerbicz_ and _M. F. Hasler_, May 16 2009