OFFSET
1,2
COMMENTS
All 2-digit numbers are terms.
All numbers having 0 as a digit (A011540) are terms, because p = 0, x^2 - s*x + p = x*(x-s) and the roots 0 and s are integers.
LINKS
Jean-Marc Rebert, Table of n, a(n) for n = 1..3002
FORMULA
a(n) = n + O(n^k) where k = log(9)/log(10) = 0.95424.... - Charles R Greathouse IV, Jul 07 2022
EXAMPLE
k = 14 is a term, since the sum of the digits of 14 is 5, the product of the digits of 14 is 4 and the roots 1 and 4 of x^2 - 5x + 4 are all integers.
MATHEMATICA
kmax=80; kdig:=IntegerDigits[k]; s:=Total[kdig]; p:=Product[Part[kdig, i], {i, Length[kdig]}]; a:={}; For[k=0, k<=kmax, k++, If[Element[x/.Solve[x^2-s*x+p==0, x], Integers], AppendTo[a, k]]]; a (* Stefano Spezia, Jul 06 2022 *)
PROG
(PARI) is(n)=my(v=if(n, digits(n), [0])); issquare(vecsum(v)^2-4*vecprod(v))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jean-Marc Rebert, Jul 04 2022
STATUS
approved