This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A378857 #14 Mar 02 2025 23:47:17 %S A378857 2,21,41,11,24,10,33,73,153,-1,171,241,361,-1,-1,6,461,-1,471,-1, %T A378857 12086,-1,1281,51,94,-1,1181,701,1091,-1,231,197,5781,-1,-1,161,221, %U A378857 -1,1231,-1,236,-1,61,1451,-1,-1,861,13381,143,-1,107,501,2761,-1,-1,136 %N A378857 a(n) is the smallest k > 1 such that n^k starts and ends with n, or -1 if there is no such k. %C A378857 Given an integer n such that a(n) != -1, it follows that n^A051248(n) starts with n and n^A074250(n) ends with n, and both are the smallest exponents that satisfy these conditions. In this case, n^a(n) starts and ends with n. Due to this condition, larger exponents are required. For example, for n = 21 the smallest exponent satisfying the condition is 12086. %F A378857 a(n) >= max{A074250(n), A051248(n)} except that a(n) = -1 when A074250(n) = -1. %e A378857 2^21 = 2097152 is the smallest power of 2 that starts and ends with 2, so a(2) = 21. %Y A378857 Cf. A051248, A074250, A374026. %K A378857 sign,base %O A378857 1,1 %A A378857 _Gonzalo MartÃnez_, Feb 10 2025