login
A377163
a(n) is the least exponent k such that the decimal representation of n occurs at exactly n positions within the decimal representation of n^k, or -1 if this is not possible.
2
1, 18, 21, 32, 30, 38, 33, 55, 69, -1, 484, 588, 619, 402, 667, 814, 785, 786, 835, 2841, 881, 960, 1167, 857, 1230, 1144, 1028, 1244, 1395, 3857, 1484, 1295, 1526, 1546, 1524, 1633, 1377, 1739, 1645, 4410, 1837, 1677, 1719, 1811, 1782, 1954, 1971, 2179, 2392, 5054
OFFSET
1,2
LINKS
PROG
(PARI) findstr(m, n) = my(dm=digits(m), dn=digits(n)); sum(j=1, #dm-#dn+1, dn==dm[j..j+#dn-1]);
a377163(n) = if(n>1 && n==10^valuation(n, 10), -1, for(x=1, oo, if(findstr(n^x, n)==n, return(x))))
CROSSREFS
A244603 are the terms a(1)..a(9).
Sequence in context: A088341 A105145 A244603 * A120416 A293751 A090891
KEYWORD
base,sign
AUTHOR
Hugo Pfoertner, Nov 01 2024
STATUS
approved