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.

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