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 A303077 #8 Apr 25 2018 10:47:28 %S A303077 1,2,3,2,5,3,7,2,5,5,11,3,13,7,7,2,17,5,19,5,13,11,23,3,13,13,13,7,29, %T A303077 7,31,2,17,17,19,5,37,19,23,5,41,13,43,11,29,23,47,3,17,13,19,13,53, %U A303077 13,31,7,29,29,59,7,61,31,31,2,17,17,67,17,37,19,71,5 %N A303077 a(1) = 1, and for n > 1, a(n) is the greatest prime number whose binary digits appear in order but not necessarily as consecutive digits in the binary representation of n. %C A303077 This sequence has similarities with A078833; there binary digits have to be consecutive, here not. %C A303077 For n > 1, a(n) is the greatest prime number appearing in the n-th row of A301983. %H A303077 Rémy Sigrist, <a href="/A303077/b303077.txt">Table of n, a(n) for n = 1..10000</a> %H A303077 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A303077 a(2*n) = a(n) for any n > 1. %F A303077 a(n) = n iff n is not composite. %F A303077 a(n) = 2 iff n = 2^k for some k > 0. %F A303077 a(n) >= A078833(n). %e A303077 The first terms, alongside the binary representations of n and of a(n), are: %e A303077 n a(n) bin(n) bin(a(n)) %e A303077 -- ---- ------ --------- %e A303077 1 1 1 1 %e A303077 2 2 10 10 %e A303077 3 3 11 11 %e A303077 4 2 100 10_ %e A303077 5 5 101 101 %e A303077 6 3 110 11_ %e A303077 7 7 111 111 %e A303077 8 2 1000 10__ %e A303077 9 5 1001 10_1 %e A303077 10 5 1010 101_ %e A303077 11 11 1011 1011 %e A303077 12 3 1100 11__ %e A303077 13 13 1101 1101 %e A303077 14 7 1110 111_ %e A303077 15 7 1111 111_ %o A303077 (PARI) a(n) = my (s=Set(1), b=binary(n)); for (i=2, #b, s=setunion(s, Set(apply(k->2*k+b[i], s)))); vecmax(select(k->k==1 || isprime(k), s)) %Y A303077 Cf. A078833, A301983. %K A303077 nonn,base %O A303077 1,2 %A A303077 _Rémy Sigrist_, Apr 18 2018