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 A292936 #40 Oct 01 2017 00:28:49 %S A292936 0,1,1,0,2,0,2,0,0,0,3,0,1,0,0,0,1,0,1,0,0,0,4,0,0,0,0,0,1,0,1,0,0,0, %T A292936 0,0,1,0,0,0,1,0,1,0,0,0,5,0,0,0,0,0,1,0,0,0,0,0,2,0,1,0,0,0,0,0,1,0, %U A292936 0,0,1,0,1,0,0,0,0,0,1,0,0,0,2,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0 %N A292936 a(n) = the least k >= 0 such that floor(n/(2^k)) is a nonprime; a(n) is degree of the "safeness" of prime, 0 if n is not a prime, 1 for unsafe primes (A059456), and k >= 2 for primes that are (k-1)-safe but not k-safe. %C A292936 Records occur at positions 1, 2, 5, 11, 23, 47, 2879, ... (A292937). %H A292936 Antti Karttunen, <a href="/A292936/b292936.txt">Table of n, a(n) for n = 1..65537</a> %F A292936 a(n) = A007814(1+A292599(n)). %F A292936 For n >= 1, a(n) <= A078349(n). %F A292936 For n > 47, a(n) <= A007814(1+n). %p A292936 A292936 := proc(n) %p A292936 for k from 0 do %p A292936 if not isprime(floor(n/2^k)) then %p A292936 return k; %p A292936 end if; %p A292936 end do: %p A292936 end proc: %p A292936 seq(A292936(n),n=1..100) ; # _R. J. Mathar_, Sep 28 2017 %t A292936 Table[SelectFirst[Range[0, 10], ! PrimeQ@ Floor[n/(2^#)] &], {n, 105}] (* _Michael De Vlieger_, Sep 29 2017 *) %o A292936 (PARI) A292936(n) = { my(k=0); while(isprime(n), n >>= 1; k++); k; }; %o A292936 (Scheme) (define (A292936 n) (A007814 (1+ (A292599 n)))) %Y A292936 Cf. A007814, A078349, A292599, A292937. %Y A292936 Cf. A000040, A005385, A066179, A157358, A157359 (positions of terms that are > k, for k = 0..4). %Y A292936 Cf. A059456 (positions of ones). %K A292936 nonn %O A292936 1,5 %A A292936 _Antti Karttunen_, Sep 27 2017