|
|
A358350
|
|
Numbers that can be written as (m + sum of digits of m + product of digits of m) for some m.
|
|
5
|
|
|
3, 6, 9, 11, 12, 14, 15, 17, 18, 20, 21, 22, 23, 24, 26, 27, 29, 30, 32, 33, 34, 35, 38, 42, 43, 44, 46, 48, 50, 53, 54, 55, 56, 58, 62, 63, 66, 68, 69, 73, 74, 76, 77, 78, 80, 82, 83, 86, 88, 90, 92, 95, 97, 98, 99, 101, 103, 104, 105, 106, 107, 108, 109, 110
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
(i) Can arbitrarily long sets of consecutive integers be found in this sequence?
(ii) Is the gap between two consecutive terms bounded?
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
|
|
|
FORMULA
|
|
|
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))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|