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.

A230099 a(n) = n + (product of digits of n).

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 50, 56, 62, 68, 74, 80, 86, 92, 98, 104, 60, 67, 74, 81, 88, 95, 102, 109, 116, 123, 70, 78, 86, 94, 102, 110, 118, 126
Offset: 0

Views

Author

N. J. A. Sloane, Oct 12 2013

Keywords

Comments

A230099, A063114, A098736, A230101 are analogs of A092391 and A062028.

Crossrefs

Programs

  • Haskell
    a230099 n = a007954 n + n  -- Reinhard Zumkeller, Oct 13 2013
    
  • Maple
    with transforms; [seq(n+digprod(n), n=0..200)];
  • PARI
    a(n) = if (n, n + vecprod(digits(n)), 0); \\ Michel Marcus, Dec 18 2018
    
  • Python
    from math import prod
    def a(n): return n + prod(map(int, str(n)))
    print([a(n) for n in range(78)]) # Michael S. Branicky, Jan 09 2023

Formula

a(n) = n iff n contains a digit 0 (A011540). - Bernard Schott, Jul 31 2023

A230104 Numbers k such that m + (product of digits of m) is never equal to k.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 25, 27, 31, 33, 36, 37, 39, 43, 48, 49, 51, 52, 53, 57, 59, 61, 63, 64, 69, 71, 72, 73, 76, 77, 79, 82, 83, 84, 87, 91, 93, 96, 97, 99, 111, 113, 115, 117, 119, 121, 127, 131, 133, 136, 137, 139, 148, 149, 151, 153, 157, 159, 163, 164, 169, 171, 172, 173, 176, 177, 179, 182, 183
Offset: 1

Views

Author

N. J. A. Sloane, Oct 13 2013

Keywords

Comments

Numbers missing from A230099.

Crossrefs

Programs

  • PARI
    f(n) = if (n, n + vecprod(digits(n)), 0); \\ A230104
    isok(m) = for(i=1, m, if (f(i) == m, return(0))); return(1); \\ Michel Marcus, Jan 09 2023
    
  • Python
    from math import prod
    def b(n): return n + prod(map(int, str(n)))
    def aupto(n): return sorted(set(range(n+1)) - set(b(m) for m in range(n+1)))
    print(aupto(183)) # Michael S. Branicky, Jan 09 2023

A230105 Numbers n such that m + (product of digits of m) = n has exactly one solution m.

Original entry on oeis.org

0, 2, 4, 6, 8, 22, 23, 24, 28, 29, 30, 32, 34, 35, 40, 41, 42, 44, 45, 46, 47, 54, 55, 56, 58, 65, 66, 67, 68, 75, 78, 81, 85, 88, 89, 90, 92, 94, 95, 101, 103, 105, 106, 108, 112, 114, 122, 124, 125, 128, 129, 132, 135, 141, 143, 144, 145, 146, 147, 152, 154, 155, 156, 158, 161, 165, 166, 167, 168, 175, 178, 181, 185
Offset: 1

Views

Author

N. J. A. Sloane, Oct 13 2013

Keywords

Comments

Numbers n such that A230103(n) = 1.

Crossrefs

Programs

  • Python
    from math import prod
    from collections import Counter
    def b(n): return n + prod(map(int, str(n)))
    def aupto(n):
        c = Counter(b(m) for m in range(n+1))
        return [k for k in range(n+1) if c[k] == 1]
    print(aupto(185)) # Michael S. Branicky, Jan 09 2023

A358351 Number of values of m such that m + (sum of digits of m) + (product of digits of m) is n.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 2, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 3, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 1, 1, 1, 0, 2, 0, 0, 0, 2, 1, 0, 0, 1, 0, 2, 1, 0, 0, 0, 1, 2, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 2, 0
Offset: 1

Views

Author

Bernard Schott, Nov 16 2022

Keywords

Comments

a(n) is the number of times n occurs in A161351.
a(n) > 0 iff n is in A358350.

Examples

			A161351(15) = 15 + (1+5) + (1*5) = 26 =  21 + (2+1) + (2*1) = A161351(21), so, a(26) = 2.
		

Crossrefs

Similar: A230093 (m+digitsum), A230103 (m+digitprod).

Programs

  • Mathematica
    f[n_] := n + Total[(d = IntegerDigits[n])] + Times @@ d; With[{m = 100}, BinCounts[Table[f[n], {n, 1, m}], {1, m, 1}]] (* Amiram Eldar, Nov 16 2022 *)
  • PARI
    first(n) = {my(res = vector(n)); for(i = 1, n, c = i + sumdigits(i) + vecprod(digits(i)); if(c <= n, res[c]++ ) ); res } \\ David A. Corneth, Nov 16 2022
    
  • Python
    from itertools import combinations_with_replacement
    from math import prod
    def A358351(n):
        c = set()
        for l in range(1,len(str(n))+1):
            l1, l2 = 10**l, 10**(l-1)
            for d in combinations_with_replacement(tuple(range(10)),l):
                s, p = sum(d), prod(d)
                if l1>(m:=n-s-p)>=l2 and sorted(int(d) for d in str(m)) == list(d):
                    c.add(m)
        return len(c) # Chai Wah Wu, Nov 20 2022

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
Showing 1-5 of 5 results.