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.

A372442 (Greatest binary index of n) minus (greatest prime index of n).

Original entry on oeis.org

1, 0, 2, 0, 1, -1, 3, 2, 1, -1, 2, -2, 0, 1, 4, -2, 3, -3, 2, 1, 0, -4, 3, 2, -1, 3, 1, -5, 2, -6, 5, 1, -1, 2, 4, -6, -2, 0, 3, -7, 2, -8, 1, 3, -3, -9, 4, 2, 3, -1, 0, -10, 4, 1, 2, -2, -4, -11, 3, -12, -5, 2, 6, 1, 2, -12, 0, -2, 3, -13, 5, -14, -5, 4, -1
Offset: 2

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.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Crossrefs

For sum instead of maximum we have A372428, zeros A372427.
Positions of zeros are A372436.
For minimum instead of maximum we have A372437, zeros {}.
For length instead of maximum we have A372441, zeros A071814.
Positions of odd terms are A372588, even A372589.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A061395 gives greatest prime index, least A055396.
A070939 gives length of binary expansion.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.

Programs

  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Max[bix[n]]-Max[prix[n]],{n,2,100}]

Formula

a(n) = A070939(n) - A061395(n) = A029837(n) - A061395(n) for n > 1.