login
A321990
Positive numbers for which the product of digits is equal to the power tower of digits (right-associative).
1
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 21, 22, 31, 41, 51, 61, 71, 81, 91, 111, 211, 221, 311, 411, 511, 611, 711, 811, 911, 1111, 2111, 2211, 2412, 3111, 3313, 4111, 4212, 5111, 6111, 6213, 7111, 8111, 8214, 9111, 11111, 21111, 22111, 22212, 24112, 24121, 28128, 28144
OFFSET
1,2
COMMENTS
Positive numbers k such that A007954(k) = A256229(k).
All numbers of the form xx1x...x with x x's are terms, as are numbers of the form xxx1x...x with x^x x's, and so on.
If the first two digits of a number are x,y, respectively, and if (x^(y-1))/y is a positive integer, then the number of the form xy1(...), where (...) is a sequence of digits whose product is (x^(y-1))/y, is a term. - Michal Gren, Nov 29 2018
EXAMPLE
6213 is a term since 6^2^1^3 = 6*2*1*3 = 36.
8^4 = 4096. 8*4 = 32. So 841 followed by any sequence of digits whose product is 4096/32 = 128 is in the sequence. - David A. Corneth, Nov 28 2018
MATHEMATICA
aQ[n_] := Module[{digits = IntegerDigits[n]}, If[MemberQ[digits, 0], False, Power@@digits == Times@@digits]]; Select[Range[1000], aQ] (* for small terms, or: *) aQ[n_] := Module[{d=IntegerDigits[n]}, If[MemberQ[d, 0], Return[False]]; p = Times@@d; If[MemberQ[d, 1], If[d[[1]]==1, Return[p==1]]; d = d[[1 ;; FirstPosition[d, 1][[1]]-1]]]; Do[p = Log[d[[i]], p], {i, 1, Length[d]}]; p==1]; Select[Range[1000], aQ] (* Amiram Eldar, Nov 24 2018 *)
PROG
(PARI) a007954(n) = my(d=digits(n)); vecprod(d);
f256229(n, pd)= my(p=1); until(!n\=10, p=(n%10)^p; if (p>pd, return (-p))); p;
isok(k) = my(pd = a007954(k)); pd == f256229(k, pd); \\ Michel Marcus, Nov 25 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michal Gren, Nov 23 2018
STATUS
approved