A321990 Positive numbers for which the product of digits is equal to the power tower of digits (right-associative).
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
Examples
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
Links
- Michal Gren, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
-
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
Comments