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.

A280827 a(n) = A076649(n) - A055642(n).

Original entry on oeis.org

-1, 0, 0, 1, 0, 1, 0, 2, 1, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 1, 1, 0, 1, 0, 3, 1, 1, 0, 2, 0, 1, 1, 2, 0, 1, 0, 2, 1, 1, 0, 3, 0, 1, 1, 2, 0, 2, 1, 2, 1, 1, 0, 2, 0, 1, 1, 4, 1, 2, 0, 2, 1, 1, 0, 3, 0, 1, 1, 2, 1, 2, 0, 3, 2, 1, 0, 2, 1, 1, 1, 3, 0, 2, 1, 2, 1, 1, 1, 4, 0, 1, 2, 1
Offset: 1

Views

Author

Ely Golden, Jan 08 2017

Keywords

Comments

a(1) is the only negative term in this sequence. - Ely Golden, Jan 10 2017
a(n) = 0 if and only if n is a member of A109608. - Ely Golden, Jan 10 2017

Examples

			a(10) = 0, as 2*5 have 2 digits total, and 10 has 2 digits. Thus a(10) = 2-2 = 0.
a(1) is defined to be -1, as the empty product has 0 digits, and 1 has 1 digit. Thus a(1) = 0-1 = -1.
		

Crossrefs

Programs

  • 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
    while(index<=10000):
        print(str(index)+" "+str(digitDiff(index,radix)))
        index+=1

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
    

A109600 Numbers n such that number of 1's in binary representation of n equals the number of digits required to write the prime factors of n.

Original entry on oeis.org

2, 6, 9, 10, 17, 22, 26, 28, 38, 42, 50, 54, 60, 69, 70, 74, 78, 82, 90, 92, 98, 99, 102, 114, 116, 131, 133, 134, 135, 137, 145, 146, 150, 153, 154, 161, 165, 169, 170, 172, 193, 194, 195, 202, 209, 210, 212, 220, 225, 226, 234, 242, 248, 259, 265, 275, 278, 282
Offset: 1

Views

Author

Jason Earls, Jul 30 2005

Keywords

Comments

708588 has 13 1's in base 2 and 13 digits in its factorization. What is the next term in this sequence with more 1's and digits?
2881008 has 14 1's in base 2 and 14 digits in its factorization. - Harvey P. Dale, Jul 04 2023

Examples

			54=110110 in base 2 and 54=2*3*3*3, hence 54 is in the sequence.
		

Crossrefs

Cf. A076649.

Programs

  • Mathematica
    Select[Range[2,300],DigitCount[#,2,1]==Total[IntegerLength[#[[1]]]#[[2]]&/@ FactorInteger[ #]]&] (* Harvey P. Dale, Jul 04 2023 *)

A348306 List of Agathokakological Numbers "k": string of digits of the juxtaposition of the prime factors of k has the same length as k but these digits do not appear in k.

Original entry on oeis.org

10, 14, 21, 49, 106, 111, 118, 129, 134, 146, 158, 161, 166, 177, 201, 219, 249, 259, 267, 329, 343, 413, 511, 553, 623, 1011, 1029, 1046, 1077, 1081, 1101, 1106, 1114, 1119, 1138, 1149, 1167, 1186, 1227, 1299, 1318, 1354, 1358, 1363, 1418, 1454, 1466, 1538, 1541, 1546, 1561, 1589, 1591
Offset: 1

Views

Author

Samuel Harkness, Oct 11 2021

Keywords

Comments

Theorem: (See PDF "PROOFS" in Links)
Of Agathokakological Numbers k,
No k have a leading 9.
No k end in 2 or 5.
10 is the only k to end in 0. It is also the only k with 5 as a prime factor.
Can only be square terms when k is of the order 10^m where m is odd.
For k written as a*10^m, k can only be even when 1<=a<1.888...
Empirical observation: When graphed with the log of the n-th term on x axis and the log of the n-th term's value on the y axis a pattern appears with a similar shape for each new power of ten (see figure "LogLogGraph" in Links)
Special cases 28651 = 7*4093 and 65821 = 7*9043 use all digits 0-9 once.
"Agathokakological" is a Greek word meaning "composed of both good and evil." (Merriam-Webster) The composition (prime factorization) of Agathokakological Numbers is both good (same length) and evil (no common digits).

Examples

			158 = 2 * 79 since {2,7,9} do not appear in {1,5,8} and both have 3 digits.
		

Crossrefs

Intersection of A035139 and A109608.
Subsequence of A047201 from n=2.

Programs

  • Mathematica
    q[n_] := Module[{d = IntegerDigits[n], f = FactorInteger[n]}, Length[d] == Plus @@ ((Last[#]*IntegerLength[First[#]]) & /@ f ) && Intersection[d, Join @@ IntegerDigits[f[[;; , 1]]]] == {}]; Select[Range[1600], q] (* Amiram Eldar, Oct 12 2021 *)
  • PARI
    digsf(n) = my(f=factor(n), list=List()); for (k=1, #f~, my(dk=digits(f[k,1])); for (i=1, f[k,2], for (j=1, #dk, listput(list, dk[j])))); Vec(list);
    isokd(m) = my(df=digsf(m), d=digits(m)); (#df == #d) && (#setintersect(Set(df), Set(d)) == 0); \\ Michel Marcus, Oct 11 2021
    
  • Python
    from sympy import factorint
    def ok(n):
        s, f = str(n), factorint(n)
        pfd = set("".join(str(p) for p in f))
        if set(s) & pfd != set(): return False
        return len(s) == sum(len(str(p))*f[p] for p in f)
    print(list(filter(ok, range(1601)))) # Michael S. Branicky, Oct 11 2021

A108871 Numbers n such that the number of digits required to write the prime factors of n is equal to the number of divisors of n.

Original entry on oeis.org

11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 143, 187, 202, 206, 209, 214, 218, 221, 226, 247, 253, 254, 262, 274, 278, 298, 299, 302, 303, 309, 314, 319, 321, 323, 326, 327, 334, 339, 341, 346, 358, 362, 377, 381, 382, 386
Offset: 1

Views

Author

Jason Earls, Jul 13 2005

Keywords

Comments

190333 has 10 divisors and 10 digits in its prime factorization. What is the next term in this sequence with more divisors and digits?
2093663 has 12 divisors and 12 digits in its prime factorization. - Harvey P. Dale, Apr 05 2019
Prime factors are counted with multiplicity. - Harvey P. Dale, Apr 05 2019

Examples

			143 is a term because it takes 4 digits to write its prime factorization
143=11*13 and has 4 divisors [1, 11, 13, 143].
		

Crossrefs

Cf. A076649.

Programs

  • Mathematica
    ndQ[n_]:=Total[#[[2]]IntegerLength[#[[1]]]&/@FactorInteger[n]] == DivisorSigma[ 0,n]; Select[Range[2,500],ndQ]
Showing 1-5 of 5 results.