A061762 a(n) = (sum of digits of n) + (product of digits of n).
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 4, 9, 14, 19, 24, 29, 34, 39, 44, 49, 5, 11, 17, 23, 29, 35, 41, 47, 53, 59, 6, 13, 20, 27, 34, 41, 48, 55, 62, 69, 7, 15, 23, 31, 39, 47
Offset: 0
Examples
a(14) = 1+4 + 1*4 = 9.
References
- S. Parmeswaran, S+P numbers, Mathematics Informatics Quarterly, Vol. 9, No. 3 (Sep 1999), Bulgaria.
Links
- Harry J. Smith, Table of n, a(n) for n = 0..1000
Programs
-
Magma
[0] cat [&+Intseq(n)+&*Intseq(n): n in [1..80]];// Vincenzo Librandi, Jan 03 2020
-
Maple
read("transforms") : A061762 := proc(n) digsum(n)+A007954(n) ; end proc: # R. J. Mathar, Aug 13 2012
-
Mathematica
Table[Plus @@ IntegerDigits[n] + Times @@ IntegerDigits[n], {n, 0, 75}] (* Jayanta Basu, Apr 05 2013 *)
-
PARI
a(n) = if (n==0, 0, my(d=digits(n)); vecsum(d) + vecprod(d)); \\ Michel Marcus, Oct 29 2019, Jan 03 2020
-
Python
from operator import mul from functools import reduce def A061762(n): a = [int(d) for d in str(n)] return sum(a)+reduce(mul,a) # Chai Wah Wu, Aug 14 2017
Extensions
Corrected and extended by Larry Reeves (larryr(AT)acm.org) and Matthew Conroy, May 23 2001
Comments