cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A358350 Numbers that can be written as (m + sum of digits of m + product of digits of m) for some m.

Original entry on oeis.org

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
Offset: 1

Views

Author

Bernard Schott, Nov 11 2022

Keywords

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

Examples

			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.
		

Crossrefs

Range of A161351.
Similar: A176995 (m+digitsum), A336826 (m*digitprod), A337718 (m+digitprod).
Cf. A000533.

Programs

  • 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 *)
  • 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

Formula

a(n) ~ kn with k approximately 1.108374, see comments. - Charles R Greathouse IV, Nov 16 2022

A337816 Numbers that can be written as (m * sum of digits of m) for some m.

Original entry on oeis.org

0, 1, 4, 9, 10, 16, 22, 25, 36, 40, 49, 52, 63, 64, 70, 81, 88, 90, 100, 112, 115, 124, 136, 144, 160, 162, 175, 190, 198, 202, 205, 208, 220, 238, 243, 250, 252, 280, 301, 306, 319, 324, 333, 352, 360, 364, 370, 400, 405, 412, 418, 424, 427, 448, 460, 468, 484, 486, 490
Offset: 1

Views

Author

Bernard Schott, Sep 23 2020

Keywords

Comments

If 3 divides a(n), then 9 divides a(n).

Examples

			10 = 10 * (1+0);
22 = 11 * (1+1).
		

Crossrefs

Range of A057147 and of A117570.
Similar sequences: A176995 (m + sum of digits of m), A336826 (m * product of digits of m), A337718 (m + product of digits of m).
Cf. A337817.
Some subsequences: A011557, A052268, A093141.

Programs

  • Mathematica
    m = 500; Select[Union @ Table[k * Plus @@ IntegerDigits[k], {k, 0, m}], # <= m &] (* Amiram Eldar, Sep 23 2020 *)
  • PARI
    is(k)={if(k==0, return(1)); fordiv(k, d, if(d*sumdigits(d)==k, return(1))); 0} \\ Andrew Howroyd, Sep 23 2020

A337732 Least positive number that has exactly n different representations as the sum of a number and the product of its decimal digits.

Original entry on oeis.org

1, 0, 10, 50, 150, 1014, 9450, 8305, 283055, 931395, 92441055, 84305555, 28322235955
Offset: 0

Views

Author

Bernard Schott, Sep 18 2020

Keywords

Comments

Least integer m such that A230103(m) = n.

Examples

			10 = 5 + 5 = 10 + 1*0 and as 10 is the smallest number with 2 such representations, so, a(2) = 10.
50 = 35 + 3*5 = 42 * 4*2 = 50 + 5*0 and as 50 is the smallest number with 3 such representations, so, a(3) = 50.
		

Crossrefs

Cf. A337051 (similar for Bogotá numbers).

Programs

  • Mathematica
    f[n_] := n + Times @@ IntegerDigits[n]; m = 10^6; v = Table[0, {m}]; Do[i = f[n] + 1; If[i <= m, v[[i]]++], {n, 0, m}]; s = {1}; k = 1; While[(p = Position[v, k]) != {}, AppendTo[s, p[[1, 1]] - 1]; k++]; s (* Amiram Eldar, Sep 18 2020 *)
  • PARI
    f(n) = if (n==0, return(1)); sum(k=1, n, k+vecprod(digits(k)) == n); \\ A230103
    a(n) = my(k=0); while(f(k) !=n, k++); k; \\ Michel Marcus, Sep 18 2020

Extensions

a(4)-a(7) from Michel Marcus, Sep 18 2020
a(8)-a(11) from Amiram Eldar, Sep 18 2020
a(12) from Bert Dobbelaere, Sep 22 2020

A337733 Numbers that can be written as (k + sum of digits of k) for some k, also as (m + product of digits of m) for some m, and finally as (q * product of digits of q) for some q.

Original entry on oeis.org

4, 16, 24, 56, 81, 88, 138, 144, 192, 242, 250, 297, 366, 408, 456, 516, 520, 522, 564, 575, 704, 744, 777, 795, 819, 884, 900, 912, 966, 1008, 1053, 1071, 1080, 1104, 1134, 1250, 1312, 1316, 1375, 1512, 1520, 1608, 1644, 1680, 1712, 1778, 1928, 1950, 2025, 2048, 2072
Offset: 1

Views

Author

Bernard Schott, Sep 18 2020

Keywords

Comments

Equivalently, Bogotá numbers that are not Colombian and that can be written as (m + product of digits of m) for some m.
The only primes that can belong to this sequence are repunits > 11 whose indices are in A004023. It is known that these primes belong to A336983, but do they belong also to A337718?

Examples

			4 = 2 + 2 = 2 + 2 = 2 * 2;
16 = 8 + 8 = 8 + 8 = 4 * 4;
24 = 21 + (2+1) = 17 + (1*7) = 12 * (1*2);
56 = 46 + (4+6) = 51 + (5*1) = 14 * (1*4);
81 = 72 + (7+2) = 63 + (6*3) = 9 * 9.
		

Crossrefs

Intersection of A176995, A336826 and A337718.
Intersection of A336983 and A337718.

Programs

  • Mathematica
    m = 2100; Select[Intersection @@ Union /@ Transpose[Table[{n + Plus @@ (d = IntegerDigits[n]), n + (p = Times @@ d), n*p}, {n, 1, m}]], # <= m &] (* Amiram Eldar, Sep 18 2020 *)
  • PARI
    isok(m) = {if (m==0, return (1)); for (k=1, m,  if (k+vecprod(digits(k)) == m, return (1)); ); } \\ A337718
    listb(nn) = Vec(setintersect(Set(vector(nn, k, k+sumdigits(k))), Set(vector(nn, k, k*vecprod(digits(k)))))); \\ A336983
    lista(nn) = select(x->isok(x), listb(nn)); \\ Michel Marcus, Sep 18 2020

Extensions

More terms from Michel Marcus, Sep 18 2020

A337839 Numbers that can be written as (k + sum of digits of k) for some k, then as (m + product of digits of m) for some m, also as (q * product of digits of q) for some q, and finally as (t * sum of digits of t) for some t.

Original entry on oeis.org

4, 16, 81, 88, 144, 250, 520, 900, 1008, 1053, 1134, 2025, 2304, 2655, 3726, 4680, 6408, 6624, 9928, 12024, 12150, 12510, 13608, 14256, 15480, 16408, 17128, 17172, 18304, 19152, 19288, 19602, 23310, 24336, 25110, 26550, 29358, 32896, 32968, 36864, 37485, 38592
Offset: 1

Views

Author

Bernard Schott, Sep 25 2020

Keywords

Comments

Equivalently, Bogotá numbers that are not Colombian and that can be written as (m + product of digits of m) for some m and also as (t * sum of digits of t) for some t.
The only primes that can belong to this sequence are repunits > 11 whose indices are in A004023. It is known that these primes belong to A336983 but do they belong also to A337718 and A337816?
Observation: 7 of the first 13 terms are perfect squares: 4, 16, 81, 144, 900, 2025, 2304 (see examples).

Examples

			4 = 2 + 2 = 2 + 2 = 2 * 2 = 2 * 2;
16 = 8 + 8 = 8 + 8 = 4 * 4 = 4 * 4;
81 = 72 + (7+2) = 63 + (6*3) = 9 * 9 = 9 * 9;
144 = 135 + (1+3+5) = 128 + (1*2*8) = 18 * (1*8) = 24 * (2+4).
		

Crossrefs

Intersection of A176995, A336826, A337718 and A337816.
Intersection of A336983, A337718 and A337816.
Intersection of A337733 and A337816.

Programs

  • Mathematica
    m = 40000; Select[Intersection @@ Union /@ Transpose[Table[{n + (s = Plus @@ (d = IntegerDigits[n])), n + (p = Times @@ d), n*s, n*p}, {n, 1, m}]], # <= m &] (* Amiram Eldar, Sep 25 2020 *)
  • PARI
    lista(nn) = {my(vd = vector(nn, k, digits(k)), vs = vector(nn, k, vecsum(vd[k])), vp = vector(nn, k, vecprod(vd[k])), vsp = Set(vector(nn, k, k+vp[k])), vss = Set(vector(nn, k, k+vs[k])), vps = Set(vector(nn, k, k*vs[k])), vpp = Set(vector(nn, k, k*vp[k])), vk = vector(nn, k, k)); Vec(setintersect(vk, setintersect(vsp, setintersect(vss, setintersect(vps, vpp)))));} \\ Michel Marcus, Oct 01 2020

Extensions

Terms a(7) and beyond from Amiram Eldar, Sep 25 2020
Showing 1-5 of 5 results.