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.

Previous Showing 21-30 of 47 results. Next

A087304 Smallest nontrivial multiple of n whose nonzero digit product is the same as that of the nonzero digit product of n. By nontrivial one means a(n) is not equal to n or (10^k)*n. 0 if no such number exists.

Original entry on oeis.org

11, 12, 1113, 104, 15, 132, 1071, 24, 11133, 110, 1001, 1020, 1131, 1022, 105, 32, 1071, 108, 133, 120, 100002, 1122, 161, 1008, 125, 1430, 702, 224, 3016, 11130, 10013, 160, 3003, 612, 315, 1332, 703, 342, 11193, 1040, 10004, 1008, 602, 1144, 225
Offset: 1

Views

Author

Amarnath Murthy, Sep 01 2003

Keywords

Comments

Conjecture: no term is zero.

Examples

			a(19) = 133 = 19*7 and 1*3*3 = 1*9.
		

Crossrefs

Cf. A051801.

Programs

  • PARI
    prd(n) = {my(d = digits(n), p = 1); for (k=1, #d, if (d[k], p *= d[k]);); p;}
    a(n) = {my(k = 2, prdn = prd(n)); while (prd(k*n) != prdn, k++; if (! (k % 10), k++)); k*n;} \\ Michel Marcus, Aug 12 2017
  • Python
    from functools import reduce
    from operator import mul
    def A087304(n):
        i, p = 2, reduce(mul,(int(d) for d in str(n) if d != '0'))
        while (max(str(i)) == '1' and str(i).count('1') == 1) or reduce(mul,(int(d) for d in str(i*n) if d != '0')) != p:
            i += 1
        return i*n # Chai Wah Wu, Aug 11 2017
    

Formula

a(10*n) = a(n)*10. - Chai Wah Wu, Aug 11 2017

Extensions

More terms from David Wasserman, Apr 19 2005

A233692 The smallest prime that produces a set of n primes such that every prime after the first one is equal to the previous plus the product of its nonzero digits.

Original entry on oeis.org

2, 23, 23, 239, 239, 239, 3413, 14249, 524219, 4167379, 324550981, 2589767209, 346333812907
Offset: 1

Views

Author

Carlos Rivera, Dec 14 2013

Keywords

Comments

This sequence was produced as solution to the problem 1270 of Claudio Meller's website (see link).

Examples

			For n=3, initial prime=23, set {23, 29, 47} because 23 -> 23+2*3=29 -> 29+2*9=47.
For n=2 to 9, the sets are
      23,     29;
      23,     29,     47;
     239,    293,    347,    431;
     239,    293,    347,    431,    443;
     239,    293,    347,    431,    443,    491;
    3413,   3449,   3881,   4073,   4157,   4297,   4801;
   14249,  14537,  14957,  16217,  16301,  16319,  16481,  16673;
  524219, 524939, 534659, 550859, 559859, 640859, 649499, 719483, 725531.
		

Crossrefs

Programs

  • PARI
    checkp(p, n) = {ok = isprime(p); for (i=1, n, print1(p, ", "); digs = digits(p); np = p + prod(i=1, #digs, if (d=digs[i], d, 1)); p = np;if (i != n, ok = ok && isprime(p));); ok;} \\ Michel Marcus, Dec 15 2013

Extensions

a(13) from Giovanni Resta, Dec 15 2013

A243140 Numbers n such that n appears in the sequence beginning with the digit-product of n and extended by adding successive digit-products.

Original entry on oeis.org

22, 26, 38, 55, 62, 88, 95, 102, 104, 108, 116, 122, 126, 138, 162, 174, 202, 206, 218, 234, 258, 410, 414, 430, 442, 474, 586, 826, 922, 1318, 1342, 1366, 1474, 1586, 1826, 1922, 1958, 2318, 2366, 2582, 2742, 3174, 3258, 3498, 4362
Offset: 1

Views

Author

Anthony Sand, May 30 2014

Keywords

Comments

Numbers n>9 with following property: form a sequence b(i) whose initial term is digit-product(n). Later terms are given by the rule that b(i) = b(i-1) + digit-product(b(i-1)) and n itself appears in the sequence.
The function digit-product(n) multiplies all nonzero digits of n (A051801). For example, digit-product(1230) = 1 * 2 * 3 = 6. The resultant sequence appears in A063114, n + product of nonzero digits of n.

Examples

			The digit-product sequence for 22 begins with digit-product(22)= 4, 4 + 4 = 8, 8 + 8 = 16, 16 + 6 = 22. Since this procedure returns to the initial number 22, it belongs here.
The digit-product sequence for 102 begins with 2, 2 + 2 = 4, 4 + 4 = 8, 8 + 8 = 16, 16 + 6 = 22, 22 + 4 = 26, 26 + 12 = 38, 38 + 24 = 62, 62 + 12 = 74, 74 + 28 = 102. Since this procedure returns to the initial number 102, it belongs here.
		

Crossrefs

Programs

  • PARI
    dp(n)=my(v=select(k->k>1,digits(n))); prod(i=1,#v,v[i])
    is(n)=my(t=dp(n)); until(t>=n, t+=dp(t)); t==n \\ Charles R Greathouse IV, Jun 05 2014

Formula

b(i) = b(i-1) + digit-product(b(i-1)).

A338880 Product of the nonzero digits of (n written in base 7).

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 6, 1, 1, 2, 3, 4, 5, 6, 2, 2, 4, 6, 8, 10, 12, 3, 3, 6, 9, 12, 15, 18, 4, 4, 8, 12, 16, 20, 24, 5, 5, 10, 15, 20, 25, 30, 6, 6, 12, 18, 24, 30, 36, 1, 1, 2, 3, 4, 5, 6, 1, 1, 2, 3, 4, 5, 6, 2, 2, 4, 6, 8, 10, 12, 3, 3, 6, 9, 12, 15, 18, 4, 4, 8, 12
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 13 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Times @@ DeleteCases[IntegerDigits[n, 7], 0], {n, 0, 80}]
    nmax = 80; A[] = 1; Do[A[x] = (1 + x + 2 x^2 + 3 x^3 + 4 x^4 + 5 x^5 + 6 x^6) A[x^7] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
  • PARI
    a(n) = vecprod(select(x->x, digits(n, 7))); \\ Michel Marcus, Nov 14 2020

Formula

G.f. A(x) satisfies: A(x) = (1 + x + 2*x^2 + 3*x^3 + 4*x^4 + 5*x^5 + 6*x^6) * A(x^7).

A351327 Numbers whose trajectory under iteration of the product of squares of nonzero digits map includes 1.

Original entry on oeis.org

1, 5, 10, 11, 15, 25, 50, 51, 52, 100, 101, 105, 110, 111, 115, 125, 150, 151, 152, 205, 215, 250, 251, 255, 357, 375, 455, 500, 501, 502, 510, 511, 512, 520, 521, 525, 537, 545, 552, 554, 573, 735, 753, 1000, 1001, 1005, 1010, 1011, 1015, 1025, 1050, 1051
Offset: 1

Views

Author

Luca Onnis, Feb 07 2022

Keywords

Comments

To determine whether a given number k is a term of this sequence, start with k, take the square of the product of its nonzero digits, apply the same process to the result, and continue until 1 is reached or a loop is entered. If 1 is reached, k is a term of this sequence.
Every power 10^k is a term of this sequence.
If k is a term, the numbers obtained by inserting zeros anywhere in k are terms.
If k is a term, the numbers obtained by inserting ones anywhere in k are terms.
If k is a term, each distinct permutation of the digits of k gives another term.
If k is a term, the number of iterations required to converge to 1 is less than or equal to 3 (conjectured).
From Michael S. Branicky, Feb 07 2022: (Start)
The product of squares of nonzero digits map, f, has fixed points given in A115385.
The map f has (at least) the following cycles:
- 324, 576, 44100, 256, 3600;
- 11664, 20736, 63504, 129600;
- 15876, 2822400, 65536, 7290000;
- 5308416, 8294400;
- 49787136000000, 64524128256, 849346560000, 386983526400, 55725627801600.
(End)

Examples

			255 is a term of the sequence: the square of the product of its nonzero digits is (2*5*5)^2=2500, the square of the product of its nonzero digits is (2*5)^2=100, and the square of the product of its nonzero digits is 1^2=1.
2 is not a term of the sequence because its trajectory under the map is 2 -> 4 -> 16 -> 36 -> 324 -> 576 -> 44100 -> 256 -> 3600 -> 324 (reached earlier), so it enters a loop and never reaches 1.
		

Crossrefs

Programs

  • Maple
    b:= proc() false end:
    q:= proc(n) local m, s; m, s:= n, {};
          do if m=1 then return true
           elif m in s or b(m) then b(n):= true; return false
           else s, m:= {s[], m}, mul(max(1, i)^2, i=convert(m, base, 10))
             fi
          od
        end:
    select(q, [$1..2000])[];  # Alois P. Heinz, Feb 11 2022
  • Mathematica
    Select[Range[1000],
    FixedPoint[
        Product[ReplaceAll[0 -> 1][IntegerDigits[#]][[i]]^2, {i, 1,
           Length[ReplaceAll[0 -> 1][IntegerDigits[#]]]}] &, #, 10] == 1 &]
  • PARI
    f(n) = vecprod(apply(d -> if (d, d^2, 1), digits(n)))
    is(n) = { my (m=f(n)); while (1, if (n==1, return (1), n==m, return (0), n=f(n); m=f(f(m)))) } \\ Rémy Sigrist, Feb 11 2022
  • Python
    from math import prod
    def psd(n): return prod(int(d)**2 for d in str(n) if d != "0")
    def ok(n):
        seen = set()
        while n not in seen: # iterate until fixed point or in cycle
            seen.add(n)
            n = psd(n)
        return n == 1
    def aupto(n): return [k for k in range(1, n+1) if ok(k)]
    print(aupto(1205)) # Michael S. Branicky, Feb 07 2022
    

A382895 Divide n successively by its nonzero digits from most to least significant, updating the result at each step and skipping any digit that doesn't divide the current value exactly.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 11, 6, 13, 14, 3, 16, 17, 18, 19, 10, 21, 11, 23, 3, 5, 13, 27, 14, 29, 10, 31, 16, 11, 34, 7, 2, 37, 38, 13, 10, 41, 21, 43, 11, 9, 46, 47, 12, 49, 10, 51, 26, 53, 54, 11, 56, 57, 58, 59, 10, 61, 31, 21, 16, 13, 11, 67, 68, 69, 10, 71, 36, 73, 74, 15
Offset: 1

Views

Author

Seiichi Manyama, Apr 08 2025

Keywords

Examples

			36 is divisible by 3, so divide by 3 to get 12.
12 is divisible by 6, so divide by 6 to get  2. So a(36) = 2.
		

Crossrefs

Programs

  • Python
    def A(n):
        m = n
        for i in map(int, str(n)):
            if i != 0 and m % i == 0:
                m //= i
        return m
    def A382895(n):
        return [A(i) for i in range(1, n + 1)]
    print(A382895(100))
  • Ruby
    def A(n)
      m = n
      n.to_s.split('').map(&:to_i).each{|i|
        m /= i if i != 0 && m % i == 0
      }
      m
    end
    def A382895(n)
      (1..n).map{|i| A(i)}
    end
    p A382895(100)
    

A382897 a(n) = n / A382895(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 1, 1, 5, 1, 1, 1, 1, 2, 1, 2, 1, 8, 5, 2, 1, 2, 1, 3, 1, 2, 3, 1, 5, 18, 1, 1, 3, 4, 1, 2, 1, 4, 5, 1, 1, 4, 1, 5, 1, 2, 1, 1, 5, 1, 1, 1, 1, 6, 1, 2, 3, 4, 5, 6, 1, 1, 1, 7, 1, 2, 1, 1, 5, 1, 7, 1, 1, 8, 1, 2, 1, 4, 5, 1, 1, 8, 1, 9, 1, 2, 3, 1, 5, 6, 1, 1, 9
Offset: 1

Views

Author

Seiichi Manyama, Apr 08 2025

Keywords

Crossrefs

Programs

  • Python
    def A(n):
        m = n
        for i in map(int, str(n)):
            if i != 0 and m % i == 0:
                m //= i
        return n // m
    def A382897(n):
        return [A(i) for i in range(1, n + 1)]
    print(A382897(100))
  • Ruby
    def A(n)
      m = n
      n.to_s.split('').map(&:to_i).each{|i|
        m /= i if i != 0 && m % i == 0
      }
      n / m
    end
    def A382897(n)
      (1..n).map{|i| A(i)}
    end
    p A382897(100)
    

A086355 Fixed point if [nonzero-digit product]-function at initial-value=prime(n) is iterated.

Original entry on oeis.org

2, 3, 5, 7, 1, 3, 7, 9, 6, 8, 3, 2, 4, 2, 6, 5, 2, 6, 8, 7, 2, 8, 8, 4, 8, 1, 3, 7, 9, 3, 4, 3, 2, 4, 8, 5, 5, 8, 8, 2, 8, 8, 9, 4, 8, 8, 2, 2, 6, 8, 8, 2, 8, 1, 7, 8, 8, 4, 4, 6, 6, 2, 2, 3, 9, 2, 9, 8, 6, 8, 2, 5, 2, 8, 4, 4, 2, 4, 4, 8, 8, 8, 2, 8, 8, 6, 6, 4, 8, 4, 6, 2, 6, 8, 8, 5, 2, 1, 3, 2, 4, 5, 9, 4, 5
Offset: 1

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Examples

			n=100, prime(100)=541, iteration list={541,20,2}, a(100)=2.
		

Crossrefs

Programs

  • Mathematica
    prd[x_] := Apply[Times, DeleteCases[IntegerDigits[x], 0]]; Table[FixedPoint[prd, Prime[w]], {w, 1, 128}]

Formula

a(n) = A051802(A000040(n)) = fixed-point of A051801(n-th prime).

A086992 Product of nonzero digits in n-th row of Pascal's triangle.

Original entry on oeis.org

1, 1, 2, 9, 96, 25, 1800, 44100, 103219200, 3869835264, 128000, 104976000000, 3071875232563200, 7050692013745766400, 626913312768, 332150625000000000000, 1292730125539029811200
Offset: 1

Views

Author

Jason Earls, Jul 29 2003

Keywords

Examples

			a(6) = 25 because the digits in the 5th row of Pascal's triangle are 1,5,(1,0),(1,0),5,1, the product of the nonzero terms is 25. - _Richard M. Green_, Feb 12 2014
		

Crossrefs

Programs

  • Mathematica
    A086992[n_]:= Times @@ DeleteCases[0]@Flatten@IntegerDigits@Table[Binomial[n, k], {k, 0, n}] (* JungHwan Min, Dec 07 2015 *)
  • PARI
    A051801(n)=my(v=select(k->k>1, digits(n))); prod(i=1, #v, v[i])
    a(n)=prod(k=1,(n-1)\2,A051801(binomial(n,k)))^2*if(n%2,1,A051801(binomial(n,n/2))) \\ Charles R Greathouse IV, Dec 08 2015

A096301 Product of nonzero digits(sum of digits(n^n)).

Original entry on oeis.org

1, 4, 9, 3, 1, 14, 10, 21, 20, 1, 4, 20, 40, 10, 81, 64, 72, 8, 14, 3, 7, 32, 24, 15, 5, 20, 72, 18, 42, 18, 32, 10, 14, 8, 12, 14, 14, 60, 18, 2, 24, 15, 9, 30, 18, 30, 84, 27, 75, 5, 16, 8, 15, 168, 32, 27, 20, 56, 28, 24, 128, 20, 180, 224, 70, 15, 60, 120, 196, 90, 144, 200, 24
Offset: 1

Views

Author

Jason Earls, Jun 25 2004

Keywords

Comments

Conjecture: a(n) = a(n+1) for infinitely many positive integers. Largest found is n=4462, i.e. pnd(sd(4462^4462)) = pnd(sd(4463^4463)) = 126.

Crossrefs

Programs

  • Mathematica
    Array[Times@@Select[IntegerDigits[Total[IntegerDigits[#^#]]],#>0&]&,80] (* Harvey P. Dale, Sep 30 2012 *)
Previous Showing 21-30 of 47 results. Next