A230386 Least sum of a set of n evil numbers (A001969) such that any two or more add to an odious number (A000069).
0, 8, 31, 64, 191, 1797, 18463
Offset: 1
Examples
The table A230385 reads n=1: {0} with sum = 0, n=2: {3, 5} with sum = 8, n=3: {5, 9, 17} or {9, 10, 12} with sum = 31, n=4: {5, 9, 17, 33} with sum = 64, n=5: {33, 34, 36, 40, 48} with sum = 191, n=6: {257, 264, 278, 288, 326, 384} with sum = 1797. For example, for n=4, all 11 numbers 5+9=14, 5+17=22, 5+33=38, 9+17=26, 9+33=42, 17+33=50, 5+9+17=31, 5+9+33=47, 5+17+33=55, 9+17+33=59, 5+9+17+33=64 are odious. n=7: {801, 802, 804, 808, 816, 4896, 9536} with sum = 18463.
Links
- M. F. Hasler, in reply to V. Shevelev, Peculiar sets of evil numbers (Cf. A001969), SeqFan list, Oct 17 2013
Programs
-
PARI
(is_A69=n->bittest(hammingweight(n),0)); A1969=select(n->!is_A69(n), vector(1600,n,n)) /* no 0 here! */; A230386(n,m=9e9)={ local(v=vector(n,i,i), ve=vector(n,i,A1969[i]), t=0, s=vector(n,i,if(i>1,A230386(i-1))), S(v)=sum(j=1,#v,v[j]), ok(e)=!forstep(i=3,2^#e-1,2, is_A69( S( vecextract( e,i )))||return), inc(i)=for(j=1,n-i,v[j]=j); for(j=n-i+1,n-1, v[j]++
S(ve) && /*print*/([m=S(ve),ve]); inc(n));m} /* This code is very fast up to n=5 and much too slow for n>5. */
Extensions
a(6) added by M. F. Hasler, Oct 18 2013
a(7) from Donovan Johnson, Oct 27 2013
Comments