login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers x = concat(a,b) such that a^b ends with the digits of x.
3

%I #6 Jun 06 2016 08:10:52

%S 387,656,856,1616,72343,72347,72896,76929,499499,548096,690496,961216,

%T 1963179,2948736,8241841,9489809,17426176,36821221,80760576,92745289,

%U 275690496,314453125,377763067,411728896,668376576,813998599,895225856,964089209,2431189707

%N Numbers x = concat(a,b) such that a^b ends with the digits of x.

%e The last digits of 3^87 are ...853387, so 387 is a term.

%t end[x_,y_,n_] := x>0 && y*Log[x] >= Log[n] && PowerMod[x, y, 10^ IntegerLength[ n]] == n; ok[n_] := Block[{p=1}, While[(p *= 10) < n &&

%t ! end[Floor[n/p], Mod[n, p], n]]; p < n]; Select[Range[10^5], ok]

%Y Cf. A273382, A266817, A266818.

%K nonn,base

%O 1,1

%A _Giovanni Resta_, Jun 06 2016