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.

Showing 1-3 of 3 results.

A175394 Least nontrivial exponent e > 2 such that n^2 is a substring of n^e (n >= 0).

Original entry on oeis.org

3, 3, 6, 6, 7, 3, 7, 6, 22, 11, 3, 13, 26, 54, 123, 27, 27, 40, 100, 43, 6, 43, 54, 42, 12, 3, 37, 43, 9, 37, 6, 19, 102, 102, 43, 96, 83, 45, 67, 34, 12, 128, 168, 102, 182, 44, 152, 104, 184, 52, 3, 17, 35, 75, 164, 67, 127, 22, 134, 98, 7, 124, 117, 146, 77, 146, 156, 87
Offset: 0

Views

Author

Zak Seidov, Apr 29 2010

Keywords

Examples

			a(2)=6 because 2^2=4 is a substring of 2^6=64
a(4)=7 because 4^2=16 is a substring of 4^7=16384.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local pat,e;
      pat:= sprintf("%d",n^2);
      for e from 3 do if StringTools:-Search(pat, sprintf("%d",n^e))<> 0 then return e fi od:
    end proc:
    map(f, [$0..100]); # Robert Israel, Mar 20 2018
  • Mathematica
    lne[n_]:=Module[{e=3,idn2=IntegerDigits[n^2]},While[!MemberQ[ Partition[ IntegerDigits[n^e], Length[ idn2],1],idn2],e++];e]; Array[lne,70,0] (* Harvey P. Dale, Aug 17 2013 *)

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.

A385171 Perfect powers m^k whose decimal expansion begins with k and ends with m, where m and k are greater than 1.

Original entry on oeis.org

25, 59049, 78125, 13060694016, 17179869184, 19073486328125, 30514648531249, 53613724194557, 59120987373568, 65944160601201, 116490258898219, 324965351768751, 512908935546875, 21936950640377856, 371308922853718751, 578261433548013568, 913517247483640899
Offset: 1

Views

Author

Gonzalo Martínez, Jun 20 2025

Keywords

Comments

Such as automorphic numbers (A003226), which are those m such that m^2 ends with m, if m^k is in this sequence, then it is a k-morphic number which also begins with k. Thus, m^k contains both m and k as substrings at its ends.
If m is in A003226 and m^2 starts with 2, then m^2 is in this sequence. For example, A003226(3)^2 = 5^2 = 25 and A003226(119)^2.
If m is in A033819 and m^3 starts with 3, then m^3 is in this sequence. For example, A033819(39)^3 = 31249^3 = 30514648531249.
This sequence has infinitely many terms since (10^m - 1)^9 is a term for all m >= 2, which starts with (m - 1) 9's and ends with m 9's.

Examples

			6^13 = 13060694016 is a term since it starts with 13 and ends with 6.
		

Crossrefs

Showing 1-3 of 3 results.