%I #9 Jun 12 2017 00:46:24
%S 1,2,3,41,5,61,7,83,97,101,11,127,13,149,151,163,17,181,19,2003,22,4,
%T 6,16,10,64,14,166,29,307,31,9,27,81,15,183,21,249,291,401,41,421,43,
%U 443,457,461,47,487,491,503,55,25,53,205,265,305,35,415,59,601,61
%N a(n) = least k such that A080670(k) begins with n.
%C a(p) <= p for any prime p.
%C a(n) <= A018800(n) for any n > 0.
%H Rémy Sigrist, <a href="/A288519/b288519.txt">Table of n, a(n) for n = 1..10000</a>
%H Rémy Sigrist, <a href="/A288519/a288519_1.png">Scatterplot of the first 1000000 terms</a>
%H Rémy Sigrist, <a href="/A288519/a288519.gp.txt">PARI program for A288519</a>
%e The following table shows the first values from A080670, as well as the terms that can be derived from it:
%e k A080670(k) Derived terms
%e -- ---------- -------------
%e 1 1 a(1) = 1
%e 2 2 a(2) = 2
%e 3 3 a(3) = 3
%e 4 22 a(22) = 4
%e 5 5 a(5) = 5
%e 6 23 a(23) = 6
%e 7 7 a(7) = 7
%e 8 23 none
%e 9 32 a(32) = 9
%e 10 25 a(25) = 10
%e 11 11 a(11) = 11
%e 12 223 a(223) = 12
%e 13 13 a(13) = 13
%e 14 27 a(27) = 14
%e 15 35 a(35) = 15
%e 16 24 a(24) = 16
%e 17 17 a(17) = 17
%e 18 232 a(232) = 18
%e 19 19 a(19) = 19
%e 20 225 a(225) = 20
%e 21 37 a(37) = 21
%e 22 211 a(211) = 22, a(21) = 22
%e 23 23 none
%e 24 233 a(233) = 24
%e 25 52 a(52) = 25
%t s = Array[Flatten@ Map[IntegerDigits, DeleteCases[ Flatten@ FactorInteger@ #, 1] /. {} -> {1}] &, 10^4]; FromDigits /@ Table[ Function[k, SelectFirst[s, If[Length@# > 0, #[[1, 1]] == 1, False] &@ SequencePosition[#, k] &]]@ IntegerDigits[n], {n, 61}] (* _Michael De Vlieger_, Jun 11 2017 *)
%Y Cf. A018800, A080670.
%K nonn,base,look
%O 1,2
%A _Rémy Sigrist_, Jun 10 2017