login
Least number k such that pk is of minimal Hamming weight, where p is the n-th prime.
2

%I #8 Jan 25 2024 07:54:50

%S 1,1,1,1,3,5,1,27,3,565,1,7085,25,3,11,1266205,9099507,17602325,

%T 128207979,119,1,13

%N Least number k such that pk is of minimal Hamming weight, where p is the n-th prime.

%o (PARI) min1s(p)=my(o=znorder(Mod(2,p)), v1=Set(powers(Mod(2,p),o)), v=v1, s=1); while(!setsearch(v,Mod(0,p)), v=setbinop((x,y)->x+y,v,v1); s++); s

%o a(n,p=prime(n))=my(m=min1s(p),t=p,k=2*p); while(hammingweight(t)>m, t+=k); t/p

%Y Cf. A278966, A278967, A086342.

%K nonn,more

%O 1,5

%A _Charles R Greathouse IV_, Dec 02 2016