OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
Members of the sequence are numbers n = X(1)...X(r) for which digits the following equation holds: (X(1) + ... + X(r)) + (X(1)*X(2) + ... + X(r-1)*X(r)) + ... + (X(1)*...*X(r)) = p, where p is a prime number, X(i) is the i-th digit of n, and every digit is nonzero.
EXAMPLE
2-digit numbers are of the form X(1)X(2).
The equation is then X(1) + X(2) + X(1)*X(2) = p, where p is prime and both digits are nonzero. Power set is {();(1);(2);(1,2)}, so indices of digits in the equation are running through the power set.
Following numbers n are solutions of the equation:
11 because 1 + 1 + 1*1 = 3;
12 (and its reverse, 21) because 1 + 2 + 1*2 = 5;
13 (and its reverse, 31) because 1 + 3 + 1*3 = 7;
15 (and its reverse, 51) because 1 + 5 + 1*5 = 11;
16 (and its reverse, 61) because 1 + 6 + 1*6 = 13;
18 (and its reverse, 81) because 1 + 8 + 1*8 = 17;
19 (and its reverse, 91) because 1 + 9 + 1*9 = 19;
23 (and its reverse, 32) because 2 + 3 + 2*3 = 11;
25 (and its reverse, 52) because 2 + 5 + 2*5 = 17;
...
MAPLE
filter := proc (n) local L; L := convert(n, base, 10); not has(L, 0) and isprime(add(add(convert(L[i .. j], `*`), i = 1 .. j), j = 1 .. nops(L))) end proc:
select(filter, [$1..1000]); # Robert Israel, Feb 11 2018
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Ctibor O. Zizka, Apr 30 2008
EXTENSIONS
More terms from Robert Israel, Feb 11 2018
STATUS
approved