The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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. 7
 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, 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, 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 COMMENTS Records occur at positions 1, 2, 5, 11, 23, 47, 2879, ... (A292937). LINKS Antti Karttunen, Table of n, a(n) for n = 1..65537 FORMULA a(n) = A007814(1+A292599(n)). For n >= 1, a(n) <= A078349(n). For n > 47, a(n) <= A007814(1+n). MAPLE A292936 := proc(n)     for k from 0 do         if not isprime(floor(n/2^k)) then             return k;         end if;     end do: end proc: seq(A292936(n), n=1..100) ; # R. J. Mathar, Sep 28 2017 MATHEMATICA Table[SelectFirst[Range[0, 10], ! PrimeQ@ Floor[n/(2^#)] &], {n, 105}] (* Michael De Vlieger, Sep 29 2017 *) PROG (PARI) A292936(n) = { my(k=0); while(isprime(n), n >>= 1; k++); k; }; (Scheme) (define (A292936 n) (A007814 (1+ (A292599 n)))) CROSSREFS Cf. A007814, A078349, A292599, A292937. Cf. A000040, A005385, A066179, A157358, A157359 (positions of terms that are > k, for k = 0..4). Cf. A059456 (positions of ones). Sequence in context: A029833 A050948 A282695 * A062590 A139215 A139216 Adjacent sequences:  A292933 A292934 A292935 * A292937 A292938 A292939 KEYWORD nonn AUTHOR Antti Karttunen, Sep 27 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 6 18:59 EDT 2020. Contains 334832 sequences. (Running on oeis4.)