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).

This page as a plain text file.
%I A280827 #19 Jan 11 2017 03:15:36
%S A280827 -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,
%T A280827 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,
%U A280827 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
%N A280827 a(n) = A076649(n) - A055642(n).
%C A280827 a(1) is the only negative term in this sequence. - _Ely Golden_, Jan 10 2017
%C A280827 a(n) = 0 if and only if n is a member of A109608. - _Ely Golden_, Jan 10 2017
%H A280827 Ely Golden, <a href="/A280827/b280827.txt">Table of n, a(n) for n = 1..10000</a>
%H A280827 Ely Golden, <a href="/A280827/a280827.txt">Proof that a(n)>=0 for all n>1</a>
%e A280827 a(10) = 0, as 2*5 have 2 digits total, and 10 has 2 digits. Thus a(10) = 2-2 = 0.
%e A280827 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.
%o A280827 (SageMath)
%o A280827 def digits(x, n):
%o A280827     if(x<=0|n<2):
%o A280827         return []
%o A280827     li=[]
%o A280827     while(x>0):
%o A280827         d=divmod(x, n)
%o A280827         li.insert(0,d[1])
%o A280827         x=d[0]
%o A280827     return li;
%o A280827 def factorDigits(x, n):
%o A280827     if(x<=0|n<2):
%o A280827         return []
%o A280827     li=[]
%o A280827     f=list(factor(x))
%o A280827     for c in range(len(f)):
%o A280827         for d in range(f[c][1]):
%o A280827             ld=digits(f[c][0], n)
%o A280827             li+=ld
%o A280827     return li;
%o A280827 def digitDiff(x,n):
%o A280827     return len(factorDigits(x,n))-len(digits(x,n))
%o A280827 radix=10
%o A280827 index=1
%o A280827 while(index<=10000):
%o A280827     print(str(index)+" "+str(digitDiff(index,radix)))
%o A280827     index+=1
%Y A280827 Cf. A109608, A076649.
%K A280827 sign,base,easy
%O A280827 1,8
%A A280827 _Ely Golden_, Jan 08 2017