OFFSET
1,1
LINKS
Michel Marcus, Table of n, a(n) for n = 1..10000
EXAMPLE
4 is a term as f(x) = B0 = 4 = 2*2 = g(x)*h(x) with g(x)=h(x)=2 and neither g(x) nor h(x) is a unit in the integer ring. This implies that f(x) is reducible over the ring of integers.
22 is a term as f(x) = B0 + B1*x = 2 + 2*x = 2(1+x) = g(x)*h(x) with g(x)=2 and h(x)=1+x.
110 is a term as f(x) = B0 + B1*x + B2*x^2 = 0 + 1*x + 1*x^2 = x + x^2 = x(1+x) = g(x)*h(x) with g(x)=x and h(x)=1+x.
MATHEMATICA
okQ[n_] := n<10 && CompositeQ[n] || MatchQ[Factor[(id = IntegerDigits[n]). x^Range[Length[id]-1, 0, -1]][[0]], Times|Power]; Select[Range[250], okQ] (* Jean-François Alcover, Feb 01 2016 *)
PROG
(PARI) isok(n) = {p = Pol(digits(n)); if (poldegree(p) == 0, return ((n!=1) && !isprime(n))); if (! polisirreducible(p), return (1)); f = factor(p); q = prod(k=1, #f~, f[k, 1]^f[k, 2]); r = p/q; nr = polcoeff(r, 0); if (nr != 1, return (1)); } \\ Michel Marcus, Jan 31 2016
(PARI) isok(n) = {d = digits(n); p = Pol(d); if (poldegree(p) == 0, return ((n!=1) && !isprime(n))); if (! polisirreducible(p), return (1)); return (gcd(d) != 1); } \\ Michel Marcus, Feb 01 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Abdul Gaffar Khan, Jan 16 2016
STATUS
approved