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.

A074250 Smallest p>1 for which n^p ends in n, or -1 if no such p exists. The smallest p for which n is a p-morphic number.

This page as a plain text file.
%I A074250 #14 Dec 02 2015 12:04:46
%S A074250 2,5,5,3,2,2,5,5,3,-1,11,21,21,-1,-1,6,21,-1,11,-1,6,-1,21,3,2,-1,21,
%T A074250 21,11,-1,11,5,21,-1,-1,6,21,-1,11,-1,6,-1,5,11,-1,-1,21,21,3,-1,3,21,
%U A074250 21,-1,-1,6,5,-1,11,-1,6,-1,21,11,-1,-1,21,5,11,-1,11,21,21,-1,3,2,21,-1,11,-1,6,-1,21,11,-1,-1,21,21,11,-1,11,21,5,-1
%N A074250 Smallest p>1 for which n^p ends in n, or -1 if no such p exists. The smallest p for which n is a p-morphic number.
%C A074250 For n < 201, 83 numbers cannot be p-morphic numbers, while 116 numbers can be p-morphic number with smallest p varying from, e.g., p(5)=3 to p(103)=101. The smallest power p>1 for which n^p has n somewhere (not necessarily at the end!) in its decimal representation is A045537. If positive, the values of p in A045537 are smaller than p in this sequence.
%H A074250 <a href="/index/Ar#automorphic">Index entries for sequences related to automorphic numbers</a>
%e A074250 a(12) = 21 because 12^21 is the smallest power (>1) of 12 that ends in 12 (that, is 12 is a 21-morphic number); a(14) = -1 because there is no power (>1) of 14 that ends in 14 (that is, 14 cannot be any p-morphic number).
%t A074250 SelectFirst[Range[2, 120], Function[k, Mod[#^k, 10^IntegerLength@ #] == #]] & /@ Range@ 200 /. n_ /; MissingQ@ n -> -1 (* _Michael De Vlieger_, Dec 02 2015, Version 10 *)
%Y A074250 Cf. A045537.
%K A074250 sign,base
%O A074250 1,1
%A A074250 _Zak Seidov_, Sep 20 2002