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-3 of 3 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

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