A280270 Numbers n such that A278981(n) < 2*n^2.
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
Links
- Ely Golden, Table of n, a(n) for n = 1..1889
- Ely Golden, Table of n, a(n), A278981(a(n)) for n = 1..1889 (a-file)
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")
Comments