cp's OEIS Frontend

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.

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.

Original entry on oeis.org

2, 21, 41, 11, 24, 10, 33, 73, 153, -1, 171, 241, 361, -1, -1, 6, 461, -1, 471, -1, 12086, -1, 1281, 51, 94, -1, 1181, 701, 1091, -1, 231, 197, 5781, -1, -1, 161, 221, -1, 1231, -1, 236, -1, 61, 1451, -1, -1, 861, 13381, 143, -1, 107, 501, 2761, -1, -1, 136
Offset: 1

Views

Author

Gonzalo Martínez, Feb 10 2025

Keywords

Comments

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.

Examples

			2^21 = 2097152 is the smallest power of 2 that starts and ends with 2, so a(2) = 21.
		

Crossrefs

Formula

a(n) >= max{A074250(n), A051248(n)} except that a(n) = -1 when A074250(n) = -1.