cp's OEIS Frontend

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.

A177687 Number of distinct transpositions of digits (zeros and units) in n-th prime written in base 2.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, May 12 2010, May 14 2010

Keywords

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.
		

Crossrefs

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

a(n) = binomial(A000120(p) + A023416(p), A000120(p)), where p=prime(n). - R. J. Mathar, May 15 2010
a(n) = A178244(A000040(n)). - Robert Israel, Oct 25 2023

Extensions

Terms corrected by D. S. McNeil and R. J. Mathar, May 14 2010