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.

A280270 Numbers n such that A278981(n) < 2*n^2.

Original entry on oeis.org

6, 8, 12, 18, 20, 24, 28, 30, 32, 36, 40, 42, 44, 48, 50, 52, 54, 56, 60, 64, 66, 70, 72, 80, 84, 88, 90, 96, 108, 112, 116, 120, 126, 132, 140, 144, 148, 150, 156, 160, 162, 168, 174, 176, 180, 186, 188, 192, 196, 198, 200, 204, 210, 216, 220, 224, 230, 232, 234, 240
Offset: 1

Views

Author

Ely Golden, Dec 30 2016

Keywords

Comments

All members of this sequence are even, as for any odd number m A278981(m) > m^3 + m^2 + m + 1 > 2*m^2.
It appears that, apart from 2, all members of A280236 appear in this sequence.

Crossrefs

Programs

  • SageMath
    def nonZeroDigits(x, n):
        if(x<=0|n<2):
            return []
        li=[]
        while(x>0):
            d=divmod(x, n)
            if(d[1]!=0):
                li.append(d[1])
            x=d[0]
        li.sort()
        return li;
    def nonZeroFactorDigits(x, n):
        if(x<=0|n<2):
            return []
        li=[]
        f=list(factor(x))
        #ensures inequality of nonZeroFactorDigits(x, n) and nonZeroDigits(x, n) if x is prime
        if((len(f)==1)&(f[0][1]==1)):
            return [];
        for c in range(len(f)):
            for d in range(f[c][1]):
                ld=nonZeroDigits(f[c][0], n)
                li+=ld
        li.sort()
        return li;
    #the actual function
    def a(n):
        c=n**2+n+1
        limit=2*(n**2)
        if(n%2!=0):
            return -1
        while((nonZeroFactorDigits(c, n)!=nonZeroDigits(c, n))&(c=limit):
            return -1
        return c;
    index=1
    value=2
    while(index<=1000):
        result=a(value)
        if(result!=-1):
            print(str(index)+" "+str(value)+" "+str(result))
            index+=1
        value+=1
    print("complete")