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.
%I A226227 #15 Aug 07 2021 17:58:16 %S A226227 1,3,4,7,8,9,12,15,17,19,24,25,28,31,32,35,36,39,49,51,56,57,60,63,65, %T A226227 68,71,72,73,76,79,96,99,100,103,113,115,120,121,124,127,128,131,136, %U A226227 137,140,143,145,147,152,153,156,159,193,196,199,200,201,204,207,224,227 %N A226227 Numbers m such that all lengths of runs of 0's in the binary representation of m are prime numbers. %C A226227 Numbers with no 0's in base 2 (that is, 2^k - 1) are included. %H A226227 Reinhard Zumkeller, <a href="/A226227/b226227.txt">Table of n, a(n) for n = 1..10000</a> %t A226227 Select[Range@227, And @@ PrimeQ[(Length /@ Split@ IntegerDigits[#, 2])[[2 ;; ;; 2]]] &] (* _Giovanni Resta_, Jun 01 2013 *) %t A226227 Select[Range[250],AllTrue[Length/@Select[Split[IntegerDigits[#,2]],MemberQ[ #,0]&],PrimeQ]&] (* _Harvey P. Dale_, Aug 07 2021 *) %o A226227 (C) %o A226227 #include <stdio.h> %o A226227 #include <stdlib.h> %o A226227 typedef unsigned long long U64; %o A226227 U64 runs[] = {0,2,3,5,7,11,13,17,19,23,29,31,37,41,43}, *wr; %o A226227 #define MemUSAGE 1ULL<<33 %o A226227 #define TOP (1ULL<<9) // <<40 ok if MemUSAGE = 1ULL<<33 %o A226227 int compare64(const void *p1, const void *p2) { %o A226227 if (*(U64*)p1 == *(U64*)p2) return 0; %o A226227 return (*(U64*)p1 < *(U64*)p2) ? -1 : 1; %o A226227 } %o A226227 void rec(U64 bits) { %o A226227 for (U64 i = 0, b; (b = bits << runs[i]) < TOP; ++i) %o A226227 *wr++ = b, rec(b*2+1); %o A226227 } %o A226227 int main() { %o A226227 U64 *wr0 = (wr = (U64*)malloc(MemUSAGE)); %o A226227 rec(1); %o A226227 //printf("%llu\n", wr-wr0); %o A226227 qsort(wr0, wr-wr0, 8, compare64); %o A226227 while (wr0<wr) printf("%llu, ", *wr0++); %o A226227 return 0; %o A226227 } %o A226227 (Haskell) %o A226227 import Data.List (group, genericLength) %o A226227 a226227 n = a226227_list !! (n-1) %o A226227 a226227_list = filter (all (== 1) . %o A226227 map (a010051 . genericLength) . %o A226227 other . tail . reverse . group . a030308_row) [1..] %o A226227 where other [] = []; other [x] = [x]; other (x:_:xs) = x : other xs %o A226227 -- _Reinhard Zumkeller_, Jun 05 2013 %Y A226227 Cf. A033015, A226228, A226229. %Y A226227 Cf. A005811, A030308, A010051. %K A226227 nonn,base %O A226227 1,2 %A A226227 _Alex Ratushnyak_, May 31 2013