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.

A372471 Irregular triangle read by rows where row n lists the binary indices of the n-th prime number.

Original entry on oeis.org

2, 1, 2, 1, 3, 1, 2, 3, 1, 2, 4, 1, 3, 4, 1, 5, 1, 2, 5, 1, 2, 3, 5, 1, 3, 4, 5, 1, 2, 3, 4, 5, 1, 3, 6, 1, 4, 6, 1, 2, 4, 6, 1, 2, 3, 4, 6, 1, 3, 5, 6, 1, 2, 4, 5, 6, 1, 3, 4, 5, 6, 1, 2, 7, 1, 2, 3, 7, 1, 4, 7, 1, 2, 3, 4, 7, 1, 2, 5, 7, 1, 4, 5, 7, 1, 6, 7
Offset: 1

Views

Author

Gus Wiseman, May 07 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			We have prime(12) = (2^1 + 2^3 + 2^6)/2, so row 12 is (1,3,6).
Each prime followed by its binary indices:
   2: 2
   3: 1 2
   5: 1 3
   7: 1 2 3
  11: 1 2 4
  13: 1 3 4
  17: 1 5
  19: 1 2 5
  23: 1 2 3 5
  29: 1 3 4 5
  31: 1 2 3 4 5
  37: 1 3 6
  41: 1 4 6
  43: 1 2 4 6
  47: 1 2 3 4 6
		

Crossrefs

Row lengths are A014499.
Second column is A023506(n) + 1.
Final column is A035100.
Prime-indexed rows of A048793.
Row-sums are A372429, restriction of A029931 (sum of binary indices).
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020.
A070939 gives length of binary expansion.

Programs

  • Mathematica
    Table[Join@@Position[Reverse[IntegerDigits[Prime[n],2]],1],{n,15}]