Very Nice Friedman Numbers A Friedman Number is a positive integer that is equal to a non-trivial expression which uses its own digits in combination with the operations +, -, *, /, ^, parentheses and concatenation.

A Nice Friedman Number is a positive integer that is equal to a non-trivial expression which uses its own digits in combination with the same operations, with the digits in their original order.

A Very Nice Friedman Number (VNFN), which I am inventing here, is a Nice Friedman Number which can be written without the less pretty (in my opinion) parts of such an expression. Parentheses, concatenation and unary negation are disallowed.

For this challenge, there are three possible ways of writing an expression without parentheses.

Prefix: This is equivalent to left-associativity. This type of expression is written with all operators to the left of the digits. Each operator applies to the following two expressions. For instance:

*+*1234 = *(+(*(1,2),3),4) = (((1*2)+3)*4) = 20


A VNFN which can be written this way is 343:

^+343 = ^(+(3,4),3) = ((3+4)^3) = 343


Postfix: This is equivalent to right-associativity. It is just like prefix notation, except that the operation go to the right of the digits. Each operator applies to the two previous expressions. For instance:

1234*+* = (1,(2,(3,4)*)+)* = (1*(2+(3*4))) = 14


A VNFN which can be written this way is 15655:

15655^+** = (1,(5,(6,(5,5)^)+)*)* = (1*(5*(6+(5^5)))) = 15655


Infix: Infix notation uses the standard order of operations for the five operations. For the purposes of the challenge, that order of operations will be defined as follows: Parenthesize ^ first, right associatively. Then, parenthesize * and / simultaneously, left associatively. Finally, parenthesize + and - simultaneously, left associatively.

1-2-3 = (1-2)-3 = -4
2/3*2 = (2/3)*2 = 4/3
2^2^3 = 2^(2^3) = 256
1^2*3+4 = (1^2)*3+4 = 7


A VNFN which can be written this way is 11664:

1*1*6^6/4 = (((1*1)*(6^6))/4) = 11664


Challenge: Given a positive integer, if it can be expressed as a non-trivial expression of its own digits in either prefix, infix or postfix notation, output that expression. If not, output nothing.

Clarifications: If multiple representations are possible, you may output any non-empty subset of them. For instance, 736 is a VNFN:

+^736 = 736
7+3^6 = 736


+^736, 7+3^6 or both would all be acceptable outputs.

A "Trivial" expression means one that does not use any operators. This only is relevant for one digit numbers, and means that one digit numbers cannot be VNFNs. This is inherited from the definition of a Friedman Number.

Answers should run in seconds or minutes on inputs under a million.

Related.

IO: Standard IO rules. Full program, function, verb or similar. STDIN, command line, function argument or similar. For outputing "Nothing", the empty string, a blank line, null or similar, and an empty collection are all fine. Output may be a string delimited with a character that cannot be in a representation, or may be a collection of strings.

Examples:

127
None

343
^+343

736
736^+
7+3^6

2502
None

15655
15655^+**

11664
1*1*6^6/4
1^1*6^6/4

5
None


Scoring: This is code golf. Fewest bytes wins.

Also, if you find one, please give a new Very Nice Friedman Number in your answer.
Perl, 345 334 318 293 263 245B

$_='$_=$i=pop;$c=y///c-1;sub f{say if$c&amp;&amp;$i==eval pop=~s/\^/**/gr}A$m)$1$4"})};f"("x$c.$m}globOx$c.$i;A$1$4($m"})};f$m.")"x$c}glob$i.Ox$c;map{f$_}glob joinO,/./g';s!O!"{+,-,*,/,^}"!g;s!A!'map{m{(\d)((?R)|(\d)(?{$m=$3}))(.)(?{$m="'!ge;s!d!D!;eval


Call with perl -M5.10.0 scratch.pl 736



Results

The first few results that I found are:

^+343
736^+
7+3^6
^+/3125
^+^3125
/^+-11664
/^--11664
1-1+6^6/4
/^++14641
^^++14641
1+5^6/1-8
1+5^6^1-8
1+5^6-2-2
1+5^6-2^2
1+5^6+2-4
1+5^6+4^2
-^+^16377
-^-+16377
/^+^16384
/^-+16384




Explanation

Fully ungolfed

I tried to repeat myself as much as possible to make the later golfing easier.

#!perl
use 5.10.0;

$_ = $input = pop;

# y///c counts characters in $_
$count = y///c - 1;

sub f {
    say if $count &amp;&amp; $input == eval pop =~ s/\^/**/gr
}

# PREFIX
map {
    m{                            # Parses *^+1234
        (\D)                      # $1 = first symbol
        (
            (?R)                  # RECURSE
        |
            (\d)(?{               # $3 = first digit
                $match=$3
            })
        )
        (.)(?{                    # $4 = last digit
            $match="$match)$1$4"
        })
    }x;
    f "(" x $count . $match
}
    # glob expands '{0,1}{0,1}' into 00,01,10,11
    glob "{+,-,*,/,^}" x $count . $input;

# POSTFIX
map {
    m{(\d)((?R)|(\d)(?{$match=$3}))(.)(?{$match="$1$4($match"})};
    f $match. ")" x $count
}
    glob $input . "{+,-,*,/,^}" x $count;

# INFIX
# /./g splits $_ into characters
map { f $_} glob join "{+,-,*,/,^}", /./g


How it's golfed


Remove whitespace &amp; comments and replace all vars with 1-character version
Wrap program in $_=q! ... !;eval
Extract strings and substitute them in afterwards.


This gives something like this, from which you can remove the line breaks for the result:

$_='
    $_=$i=pop;
    $c=y///c-1;
    sub f{say if$c&amp;&amp;$i==eval pop=~s/\^/**/gr}
    A$m)$1$4"})};f"("x$c.$m}globOx$c.$i;
    A$1$4($m"})};f$m.")"x$c}glob$i.Ox$c;
    map{f$_}glob joinO,/./g
';
s!O!"{+,-,*,/,^}"!g;
s!A!'map{m{(\d)((?R)|(\d)(?{$m=$3}))(.)(?{$m="'!ge;
s!d!D!;
eval