login
Product of (digits of n each incremented by 1) - 2.
0

%I #22 Oct 06 2021 12:35:34

%S 0,1,2,3,4,5,6,7,8,0,2,4,6,8,10,12,14,16,18,1,4,7,10,13,16,19,22,25,

%T 28,2,6,10,14,18,22,26,30,34,38,3,8,13,18,23,28,33,38,43,48,4,10,16,

%U 22,28,34,40,46,52,58,5,12,19,26,33,40,47,54,61,68,6,14,22,30,38,46,54,62

%N Product of (digits of n each incremented by 1) - 2.

%C Number of numbers in range 1 to n-1 whose decimal expansion is, term-by-term, dominated by n.

%e a(23) = 10 since all the numbers 22, 21, 20, 13, 12, 11, 10, 3, 2, 1 count.

%t f[n_]:=Module[{idnp=IntegerDigits[n]+1},Times@@idnp-2]; Array[f,80](* _Harvey P. Dale_, May 24 2011 *)

%o (PARI) a(n) = vecprod(apply(x->x+1, digits(n))) - 2; \\ _Michel Marcus_, Oct 06 2021

%Y Equals A089898(n)-2.

%K nonn,base

%O 1,3

%A _N. J. A. Sloane_, May 17 2011