OFFSET
1,1
COMMENTS
Each term k, doubled, can be put into a one-to-one correspondence with a maximal Schreier set (a subset of the positive integers with cardinality equal to the minimum element in the set) by interpreting the 1-based position of the ones in the binary expansion of 2*k (where position 1 corresponds to the least significant bit) as the elements of the corresponding maximal Schreier set. See A373556 for more information. Cf. also A371176. - Paolo Xausa, Jun 13 2024
FORMULA
MATHEMATICA
Select[Range[500], DigitCount[#, 2, 1] == IntegerExponent[#, 2] + 2 &] (* Amiram Eldar, Jul 04 2022 *)
PROG
(PARI) r=quadgen(5);
A355489_upto(nMax)={my(v1, v2, v3, v4); v1=vector(nMax, i, 0); v1[1]=1; for(i=1, nMax-1, v1[i+1]=v1[i\r+1]+1); v2=vector(nMax, i, 0); v2[1]=1; for(i=2, nMax, v2[i]=v1[i]-v1[i-1]); v3=vector(nMax, i, 0); for(i=1, 3, v3[i]=2^(i-1)); for(i=4, nMax, v3[i]=if(v2[i-1]==1, 5, 2*v3[i-fibonacci(v1[i-1]+1)]-if(v2[i]==1, 1, 0))); v4=vector(nMax, i, 0); v4[1]=3; for(i=2, nMax, v4[i]=v4[i-1]+v3[i]); v4}
(PARI) isok(k) = hammingweight(k) == valuation(k, 2) + 2; \\ Michel Marcus, Jul 06 2022
(Python 3.10+)
from itertools import count, islice
def A355489_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:n.bit_count()==(n&-n).bit_length()+1, count(max(startvalue, 1)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Mikhail Kurkov, Jul 04 2022 [verification needed]
STATUS
approved