OFFSET
1,1
COMMENTS
Integers that are in A161351.
(i) Can arbitrarily long sets of consecutive integers be found in this sequence?
(ii) Is the gap between two consecutive terms bounded?
A000533 \ {1} is a subsequence.
This has the same asymptotic density, approximately 0.9022222, as A176995, since the asymptotic density of non-pandigital numbers is 0. - Charles R Greathouse IV, Nov 16 2022
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ kn with k approximately 1.108374, see comments. - Charles R Greathouse IV, Nov 16 2022
EXAMPLE
A161351(23) = 23 + (2+3) + (2*3) = 34 so 34 is a term.
There is no integer du_10 such that du + (d+u) + (d*u) = 31, so 31 is not a term.
MATHEMATICA
f[n_] := n + Total[(d = IntegerDigits[n])] + Times @@ d; With[{m = 110}, Select[Union[Table[f[n], {n, 1, m}]], # <= m &]] (* Amiram Eldar, Nov 11 2022 *)
PROG
(PARI) f(n) = my(d=digits(n)); n + vecsum(d) + vecprod(d); \\ A161351
lista(nn) = select(x->(x<=nn), Set(vector(nn, k, f(k)))); \\ Michel Marcus, Nov 12 2022
(Python)
from math import prod
def sp(n): d = list(map(int, str(n))); return sum(d) + prod(d)
def ok(n): return any(m + sp(m) == n for m in range(n))
print([k for k in range(111) if ok(k)]) # Michael S. Branicky, Dec 19 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Nov 11 2022
STATUS
approved