OFFSET
1,1
COMMENTS
REFERENCES
S. Parmeswaran, S+P numbers, Mathematics Informatics Quarterly, Vol. 9, No. 3 Sept. 1999, Bulgaria.
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000 (first 1001 terms from Harry J. Smith)
EXAMPLE
42 is a term as 4+2 + 2*4 = 14 and 42 = 14*3.
MATHEMATICA
Select[Range[3400], (y = Times @@ (x = IntegerDigits[#])) != 0 && Divisible[#, Plus @@ x + y] &] (* Jayanta Basu, Jul 14 2013 *)
PROG
(PARI) SumD(x)= { s=0; while (x>9, s=s+x-10*(x\10); x=x\10); return(s + x) }
ProdD(x)= { p=1; while (x>9, p=p*(x-10*(x\10)); x=x\10); return(p*x) }
{ n=-1; for (m=0, 1249222, p=ProdD(m); if (p && m%(SumD(m) + p) == 0, write("b061763.txt", n++, " ", m)) ) } \\ Harry J. Smith, Jul 27 2009
(PARI) isok(k) = my(d=digits(k)); vecmin(d) && ((k % (vecprod(d) + vecsum(d))) == 0);
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amarnath Murthy, May 20 2001
EXTENSIONS
Corrected and extended by Larry Reeves (larryr(AT)acm.org), May 23 2001
Offset corrected by Giovanni Resta, Oct 29 2019
STATUS
approved