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

A230103 Number of m such that m + (product of digits of m) equals n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Oct 13 2013

Keywords

Comments

Number of times n appears in A230099.

Crossrefs

Programs

  • Maple
    # Maple code for A230099, A230103, A230104, A230105
    with(LinearAlgebra):
    read transforms; # to get digprod
    M:=1000;
    lis1:=Array(0..M);
    lis2:=Array(0..M);
    ctmax:=4;
    for i from 0 to ctmax do ct[i]:=Array(0..M); od:
    for n from 0 to M do
    m:=n+digprod(n);
    lis1[n]:=m;
    if (m <= M) then lis2[m]:=lis2[m]+1; fi;
    od:
    t1:=[seq(lis1[i],i=0..M)]; # A230099
    t2:=[seq(lis2[i],i=0..M)]; # A230103
    COMPl(t1); # A230104
    for i from 1 to M do h:=lis2[i];
    if h <= ctmax then ct[h]:=[op(ct[h]),i]; fi; od:
    len:=nops(ct[0]); [seq(ct[0][i],i=1..len)]; # A230104 again
    len:=nops(ct[1]); [seq(ct[1][i],i=1..len)]; # A230105
  • PARI
    a(n) = if (n==0, return(1)); sum(k=1, n, k+vecprod(digits(k)) == n); \\ Michel Marcus, Sep 18 2020
    
  • Python
    from math import prod
    def b(n): return n + prod(map(int, str(n)))
    def a(n): return sum(1 for m in range(n+1) if b(m) == n)
    print([a(n) for n in range(103)]) # Michael S. Branicky, Jan 09 2023
    
  • Python
    # faster version for initial segment of sequence
    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 [c[k] for k in range(n+1)]
    print(aupto(102)) # 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

A230106 Number of m such that m + (product of nonzero digits of m) equals n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Oct 13 2013

Keywords

Comments

Number of times n appears in A063114.

Crossrefs

Programs

  • Maple
    # Maple code for A063114, A230106, A063425, A096922
    with(LinearAlgebra):
    read transforms; # to get digprod0
    M:=1000;
    lis1:=Array(0..M);
    lis2:=Array(0..M);
    ctmax:=4;
    for i from 0 to ctmax do ct[i]:=Array(0..M); od:
    for n from 0 to M do
    m:=n+digprod0(n);
    lis1[n]:=m;
    if (m <= M) then lis2[m]:=lis2[m]+1; fi;
    od:
    t1:=[seq(lis1[i],i=0..M)]; # A063114
    t2:=[seq(lis2[i],i=0..M)]; # A230106
    COMPl(t1); # A063425
    for i from 1 to M do h:=lis2[i];
    if h <= ctmax then ct[h]:=[op(ct[h]),i]; fi; od:
    len:=nops(ct[0]); [seq(ct[0][i],i=1..len)]; # A063425 again
    len:=nops(ct[1]); [seq(ct[1][i],i=1..len)]; # A096922

Extensions

a(1) corrected by Zak Seidov, Oct 24 2013

A358353 Numbers that are not of the form m + (sum of digits of m) + (product of digits of m) for any m.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 13, 16, 19, 25, 28, 31, 36, 37, 39, 40, 41, 45, 47, 49, 51, 52, 57, 59, 60, 61, 64, 65, 67, 70, 71, 72, 75, 79, 81, 84, 85, 87, 89, 91, 93, 94, 96, 100, 102, 116, 120, 125, 126, 129, 137, 141, 142, 146, 150, 152, 153, 160, 161, 162, 166, 171, 172, 173, 180
Offset: 1

Views

Author

Bernard Schott, Dec 19 2022

Keywords

Comments

Numbers missing from A358350.
The first differences show some periodicity, for example those for values 2184-3811 repeat at terms 5513-7140. - Bill McEachen, Jan 08 2023

Examples

			There is no term du_10 < 36 such that du + (d+u) + (d*u) = 36, so 36 is a term.
		

Crossrefs

Similar: A003052 (m+digitsum), A230104 (m+digitprod).

Programs

  • Maple
    f:= proc(n) local L; L:= convert(n,base,10); n + convert(L,`+`)+convert(L,`*`) end proc:
    sort(convert({$1..200} minus map(f, {$1..200}),list)); # Robert Israel, Dec 22 2022
  • Mathematica
    f[n_] := n + Total[(d = IntegerDigits[n])] + Times @@ d; With[{m = 180}, Complement[Range[m], Table[f[n], {n, 1, m}]]] (* Amiram Eldar, Dec 19 2022 *)
  • PARI
    f(n) = my(d=digits(n)); vecsum(d)+vecprod(d)+n; \\ A161351
    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 sp(n): d = list(map(int, str(n))); return sum(d) + prod(d)
    def ok(n): return all(m + sp(m) != n for m in range(n+1))
    print([k for k in range(181) if ok(k)]) # Michael S. Branicky, Dec 19 2022
    
Showing 1-5 of 5 results.