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-2 of 2 results.

A176670 Composite numbers having the same digits as their prime factors (with multiplicity), excluding zero digits.

Original entry on oeis.org

1111, 1255, 12955, 17482, 25105, 28174, 51295, 81229, 91365, 100255, 101299, 105295, 107329, 110191, 110317, 117067, 124483, 127417, 129595, 132565, 137281, 145273, 146137, 149782, 163797, 171735, 174082, 174298, 174793, 174982, 193117, 208174, 210181, 217894
Offset: 1

Views

Author

Paul Weisenhorn, Apr 23 2010

Keywords

Comments

Subsequence of A006753 (Smith numbers).
These numbers still need a better name. - Ely Golden, Dec 25 2016
Terms of this sequence never have more zero digits than their prime factors. - Ely Golden, Jan 10 2017

Examples

			n = 25105 = 5*5021; both n and the factorization of n have digits 1, 2, 5, 5; sorted and excluding zeros.
n = 110191 = 101*1091; both n and the factorization of n have digits 1, 1, 1, 1, 9; sorted and excluding zeros.
n = 171735 = 3*5*107*107; both n and the factorization of n have digits 1, 1, 3, 5, 7, 7; sorted and excluding zeros.
		

Crossrefs

Cf. A006753.

Programs

  • Mathematica
    fQ[n_] := Block[{id = Sort@ IntegerDigits@ n, s = Sort@ Flatten[ IntegerDigits@ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger@ n]}, While[ id[[1]] == 0, id = Drop[id, 1]]; While[ s[[1]] == 0, s = Drop[s, 1]]; n > 1 && ! PrimeQ@ n && s == id]; Select[ Range@ 200000, fQ]
    Select[Range[2*10^5], Function[n, And[CompositeQ@ n, Sort@ DeleteCases[#, 0] &@ IntegerDigits@ n == Sort@ DeleteCases[#, 0] &@ Flatten@ Map[IntegerDigits@ ConstantArray[#1, #2] & @@ # &, FactorInteger@ n]]]] (* Michael De Vlieger, Dec 10 2016 *)
  • Python
    from sympy import factorint, flatten
    def sd(n): return sorted(str(n).replace('0', ''))
    def ok(n):
      f = factorint(n)
      return sum(f[p] for p in f) > 1 and sd(n) == sorted(flatten(sd(p)*f[p] for p in f))
    print(list(filter(ok, range(220000)))) # Michael S. Branicky, Apr 22 2021

A109608 Numbers n such that the number of digits required to write the prime factors of n equals the number of digits of n.

Original entry on oeis.org

2, 3, 5, 7, 10, 11, 13, 14, 15, 17, 19, 21, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 105, 106, 107, 109, 111, 113, 115, 118, 119, 122, 123, 125, 127, 129, 131, 133, 134, 137, 139, 141, 142, 145, 146, 147, 149, 151, 155
Offset: 1

Views

Author

Jason Earls, Jul 31 2005

Keywords

Comments

Can also be defined as numbers n such that A280827(n) = 0. - Ely Golden, Jan 08 2017

Examples

			18775 is a term because it is a 5-digit number with 5 digits in its factorization: 5*5*751 = 18775.
		

Crossrefs

Programs

  • PARI
    nbd(n) = my(f=factor(n)); sum(i=1, #f~, f[i,2]*#Str(f[i,1])); \\ A076649
    isok(n) = nbd(n) == #Str(n); \\ Michel Marcus, Oct 11 2021
    
  • Python
    from sympy import factorint
    def ok(n):
        s, f = str(n), factorint(n)
        return n and len(s) == sum(len(str(p))*f[p] for p in f)
    print(list(filter(ok, range(156)))) # Michael S. Branicky, Oct 11 2021
  • SageMath
    def digits(x, n):
        if(x<=0|n<2):
            return []
        li=[]
        while(x>0):
            d=divmod(x, n)
            li.insert(0,d[1])
            x=d[0]
        return li;
    def factorDigits(x, n):
        if(x<=0|n<2):
            return []
        li=[]
        f=list(factor(x))
        for c in range(len(f)):
            for d in range(f[c][1]):
                ld=digits(f[c][0], n)
                li+=ld
        return li;
    def digitDiff(x,n):
        return len(factorDigits(x,n))-len(digits(x,n))
    radix=10
    index=1
    value=2
    while(index<=10000):
        if(digitDiff(value,radix)==0):
            print(str(index)+" "+str(value))
            index+=1
        value+=1
    # Ely Golden, Jan 10 2017
    
Showing 1-2 of 2 results.