Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #21 Jan 02 2017 20:03:58
%S 6,8,12,18,20,24,28,30,32,36,40,42,44,48,50,52,54,56,60,64,66,70,72,
%T 80,84,88,90,96,108,112,116,120,126,132,140,144,148,150,156,160,162,
%U 168,174,176,180,186,188,192,196,198,200,204,210,216,220,224,230,232,234,240
%N Numbers n such that A278981(n) < 2*n^2.
%C All members of this sequence are even, as for any odd number m A278981(m) > m^3 + m^2 + m + 1 > 2*m^2.
%C It appears that, apart from 2, all members of A280236 appear in this sequence.
%H Ely Golden, <a href="/A280270/b280270.txt">Table of n, a(n) for n = 1..1889</a>
%H Ely Golden, <a href="/A280270/a280270_1.txt">Table of n, a(n), A278981(a(n)) for n = 1..1889 (a-file)</a>
%o (SageMath)
%o def nonZeroDigits(x, n):
%o if(x<=0|n<2):
%o return []
%o li=[]
%o while(x>0):
%o d=divmod(x, n)
%o if(d[1]!=0):
%o li.append(d[1])
%o x=d[0]
%o li.sort()
%o return li;
%o def nonZeroFactorDigits(x, n):
%o if(x<=0|n<2):
%o return []
%o li=[]
%o f=list(factor(x))
%o #ensures inequality of nonZeroFactorDigits(x, n) and nonZeroDigits(x, n) if x is prime
%o if((len(f)==1)&(f[0][1]==1)):
%o return [];
%o for c in range(len(f)):
%o for d in range(f[c][1]):
%o ld=nonZeroDigits(f[c][0], n)
%o li+=ld
%o li.sort()
%o return li;
%o #the actual function
%o def a(n):
%o c=n**2+n+1
%o limit=2*(n**2)
%o if(n%2!=0):
%o return -1
%o while((nonZeroFactorDigits(c, n)!=nonZeroDigits(c, n))&(c<limit)):
%o c+=1;
%o if(c>=limit):
%o return -1
%o return c;
%o index=1
%o value=2
%o while(index<=1000):
%o result=a(value)
%o if(result!=-1):
%o print(str(index)+" "+str(value)+" "+str(result))
%o index+=1
%o value+=1
%o print("complete")
%Y Cf. A278981, A280236.
%K nonn,base
%O 1,1
%A _Ely Golden_, Dec 30 2016