A177687 Number of distinct transpositions of digits (zeros and units) in n-th prime written in base 2.
2, 1, 3, 1, 4, 4, 10, 10, 5, 5, 1, 20, 20, 15, 6, 15, 6, 6, 35, 35, 35, 21, 35, 35, 35, 35, 21, 21, 21, 35, 1, 56, 56, 70, 70, 56, 56, 70, 56, 56, 56, 56, 8, 56, 70, 56, 56, 8, 56, 56, 56, 8, 56, 8, 36, 126, 126, 126, 126, 126, 126, 126, 126, 84, 126, 84, 126, 126, 84, 84, 126, 84
Offset: 1
Examples
a(1)=2 because 2 = 10_2 and |{10, 01}| = 2, a(2)=1 because 3 = 11_2 and |{11}| = 1, a(3)=3 because 5 = 101_2 and |{101, 011, 110}| = 3.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
A177687 := proc(n) p := ithprime(n) ; combinat[numbperm](convert(p,base,2)) ; end proc: seq(A177687(n),n=1..120) ; # R. J. Mathar, May 15 2010
-
Mathematica
Array[Length@ Permutations@ IntegerDigits[Prime@ #, 2] &, 72] (* Michael De Vlieger, Feb 15 2019 *)
Formula
Extensions
Terms corrected by D. S. McNeil and R. J. Mathar, May 14 2010
Comments