login
A230387
Least sum of a set of n odious numbers (A000069) such that the sum of two or more is an evil number (A001969).
4
1, 3, 17, 139, 795, 3903, 28575, 137991
OFFSET
1,2
COMMENTS
Is this sequence finite, or is there for any n at least one admissible set of n odious numbers, i.e., such that any sum of two or more elements add up to an evil number?
From Luca J. Dee, Apr 17 2026: (Start)
This sequence is infinite, with infinite sets for every n>1. The following example shows that a set can be constructed by generating numbers of sufficient bit length so that any carries are confined and cannot interfere across bit positions.
For n=9, we can construct the admissible set: {38413654552370587924142521344, 38413654552370587924142489631, 38413654552370587924110015519, 38413654552370587890856524831, 38413654552370553839282060319, 38413654552335685027030400031, 38413654516630021281330265119, 38413617954030345684392115231, 38376177851962534419726629919}; the pattern is more easily seen in hexadecimal:
0x7c1f07c1f07c1f07c1f07c00, 0x7c1f07c1f07c1f07c1f0001f, 0x7c1f07c1f07c1f07c0007c1f, 0x7c1f07c1f07c1f0001f07c1f, 0x7c1f07c1f07c0007c1f07c1f, 0x7c1f07c1f0001f07c1f07c1f, 0x7c1f07c0007c1f07c1f07c1f, 0x7c1f0001f07c1f07c1f07c1f, 0x7c0007c1f07c1f07c1f07c1f. (End)
LINKS
M. F. Hasler, in reply to Vladimir Shevelev, Peculiar sets of evil numbers (Cf. A001969), SeqFan list, Oct 17 2013
FORMULA
Row sums of A230384.
EXAMPLE
For n=1 to 4, we have the sets
n=1: {1} with sum = 1,
n=2: {1, 2} with sum = 3
n=3: {2, 7, 8} with sum = 17,
n=4: {4, 19, 49, 67} with sum = 139.
E.g., for n=3, the numbers 2, 7 and 8 have an odd bit sum, but 2+7, 2+8, 7+8 and 2+7+8 all have an odd bit sum.
For n=4, we also have the admissible set {14, 31, 44, 61} which has a smaller maximal element, but a larger total sum.
n=5: {42, 84, 138, 174, 357} with sum = 795.
n=6: {168, 348, 372, 702, 906, 1407} with sum = 3903.
n=7: {2273, 2274, 2276, 2280, 2288, 3296, 13888} with sum = 28575.
n=8: {575, 607, 623, 635, 5376, 23808, 33407, 72960} with sum = 137991.
PROG
(PARI) A69=select(is_A69=n->bittest(hammingweight(n), 0), vector(700, n, n)); A230387(n, m=9e9)={ local(v=vector(n, i, i), ve=vector(n, i, A69[i]), t=0, s=vector(n, i, if(i>1, A230387(i-1))), ok(e)=!forstep(i=3, 2^#e-1, 2, is_A69( sum( j=1, #t=vecextract(e, i), t[j] )) && return), inc(i)=for(j=1, n-i, v[j]=j); for(j=n-i+1, n-1, v[j]++<v[j+1] && return(ve[j]=A69[v[j]]); ve[j]=A69[v[j]=j])/*end for*/; ve[n]=A69[v[n]++]); /*end of local()*/ while( s[n]+ve[n]<m, for(i=2, n, s[n-i+1]+sum(j=n-i+1, n, ve[j]) < m && ok(vecextract(ve, 2^n-2^(n-i))) && next; inc(i); next(2)); m=min(sum(j=1, n, ve[j]), m); inc(n)); m} /* Note: The code may find a(n) earlier but won't return it unless A69 is precomputed up to the limit a(n) - a(n-1); so e.g. 700 is enough for a(5).*/
CROSSREFS
Sequence in context: A244432 A219503 A385424 * A370767 A361626 A360583
KEYWORD
nonn,base,more,hard
AUTHOR
M. F. Hasler, Oct 17 2013
EXTENSIONS
a(5)-a(6) from Charles R Greathouse IV, Oct 18 2013
a(7) from Donovan Johnson, Oct 27 2013
a(8) from Luca J. Dee, Apr 17 2026
STATUS
approved