cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

1, 1, 1, 1, 3, 5, 1, 27, 3, 565, 1, 7085, 25, 3, 11, 1266205, 9099507, 17602325, 128207979, 119, 1, 13
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • 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
    a(n,p=prime(n))=my(m=min1s(p),t=p,k=2*p); while(hammingweight(t)>m, t+=k); t/p