The simple families x{y}z (where x and z are strings of base b digits, y is base b digit) in base b are of the form (a*b^n+c)/gcd(a+c,b-1) (where a>=1, c != 0, gcd(a,c) = 1, gcd(b,c) = 1), this number has algebra factors if and only if:

either

* there is an integer r>1 such that both a*b^n and -c are perfect rth powers

or

* a*b^n*c is of the form 4*m^4 with integer m

If (a*b^n+c)/gcd(a+c,b-1) (where a>=1, c != 0, gcd(a,c) = 1, gcd(b,c) = 1) has algebra factors, then it must be composite, the only exception is when it is either GFN (generalized Fermat number) base b or GRU (generalized repunit number) base b, in these two cases this number may be prime, the only condition is the n is power of 2 if it is GFN, and the n is prime if it is GRU

GFNs and GRUs are the only simple families x{y}z (where x and z are strings of base b digits, y is base b digit) in base b which are also cyclotomic numbers (i.e. numbers of the form Phi(n,b)/gcd(Phi(n,b),n), where Phi is

cyclotomic polynomial) or Zsigmondy numbers Zs(n,b,1) (see

Zsigmondy's theorem)

GFNs and GRUs in bases 2<=b<=36:

Code:

base GFN family GRU family
2 1{0}1 {1}
3 {1}2 {1}
4 1{0}1 1{3}, {2}3
5 {2}3 {1}
6 1{0}1 {1}
7 {3}4 {1}
8 2{0}1, 4{0}1 1{7}, 3{7}
9 {4}5 1{4}, {6}7
10 1{0}1 {1}
11 {5}6 {1}
12 1{0}1 {1}
13 {6}7 {1}
14 1{0}1 {1}
15 {7}8 {1}
16 1{0}1 1{F}, 7{F}, {A}B, 2{A}B
17 {8}9 {1}
18 1{0}1 {1}
19 {9}A {1}
20 1{0}1 {1}
21 {A}B {1}
22 1{0}1 {1}
23 {B}C {1}
24 1{0}1 {1}
25 {C}D 1{6}, {K}L
26 1{0}1 {1}
27 1{D}E, 4{D}E 1{D}, 4{D}
28 1{0}1 {1}
29 {E}F {1}
30 1{0}1 {1}
31 {F}G {1}
32 2{0}1, 4{0}1, 8{0}1, G{0}1 1{V}, 3{V}, 7{V}, F{V}
33 {G}H {1}
34 1{0}1 {1}
35 {H}I {1}
36 1{0}1 1{7}, {U}V

Note: we do not include the case where the "ground base" of the GFNs or GRUs is either perfect power or of the form -4*m^4 with integer m, since such numbers have algebra factors and are composite for all n or are prime only for very small n, such families for bases 2<=b<=36 are:

Code:

base GFN family GRU family
4 {1}
8 1{0}1 {1}
9 {1}
16 {1}, 1{5}, {C}D
25 {1}
27 {D}E {1}
32 1{0}1 {1}
36 {1}

Note: the "ground base" of the GFNs or GRUs need not to be b (when b is perfect power), it may be root of b, it may also be negative integer which is root of b