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!)
 A226229 Numbers m such that all lengths of runs of digits in base 2 representation of m are primes. 4
 3, 7, 12, 24, 28, 31, 51, 56, 96, 99, 103, 115, 124, 127, 199, 204, 224, 227, 231, 248, 384, 387, 396, 408, 412, 415, 455, 460, 499, 508, 775, 792, 796, 799, 819, 824, 896, 899, 908, 920, 924, 927, 992, 995, 999, 1016, 1539, 1548, 1587, 1592, 1632, 1635, 1639, 1651, 1660 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Intersection of A226227 and A226228. From Emeric Deutsch, Jan 27 2018: (Start) Also the indices of the compositions having only prime parts. For the definition of the index of a composition see A298644. For example, 387 is in the sequence since its binary form is 110000011 and the parts of the composition [2,5,2] are prime numbers. 540 is not in the sequence since its binary form is 1000011100 and not all the parts of the composition [1,4,3,2] are primes. The command c(n) from the Maple program yields the composition having index n. (End) LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..1000 MAPLE Runs := proc (L) local j, r, i, k: npr: j := 1; r[j] := L: for i from 2 to nops(L) do if L[i] = L[i-1] then r[j] := r[j], L[i] else j := j+1: r[j] := L[i] end if end do: [seq([r[k]], k = 1 .. j)] end proc: RunLengths := proc (L) map(nops, Runs(L)) end proc: c := proc (n) ListTools:-Reverse(convert(n, base, 2)): RunLengths(%) end proc: npr := proc (s) local q, j: q := 0: for j to nops(s) do if isprime(s[j]) = true then q := q+1 else  end if end do end proc: A := {}: for n to 1661 do if npr(c(n)) = nops(c(n)) then A := `union`(A, {n}) else  end if end do: A; # most of the Maple program is due to W. Edwin Clark. # Emeric Deutsch, Jan 27 2018 MATHEMATICA Select[Range@1660, And @@ PrimeQ[Length /@ Split@ IntegerDigits[#, 2]] &] (* Giovanni Resta, Jun 01 2013 *) PROG (Haskell) import Data.List (group, genericLength) a226229 n = a226229_list !! (n-1) a226229_list = filter    (all (== 1) . map (a010051 . genericLength) . group . a030308_row) [1..] -- Reinhard Zumkeller, Jun 05 2013 CROSSREFS Cf. A033015, A226227, A226228. Cf. A005811, A030308, A010051. Sequence in context: A243190 A256483 A262567 * A167491 A210185 A280345 Adjacent sequences:  A226226 A226227 A226228 * A226230 A226231 A226232 KEYWORD nonn,base AUTHOR Alex Ratushnyak, May 31 2013 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 May 31 02:51 EDT 2020. Contains 334747 sequences. (Running on oeis4.)