login
A372442
(Greatest binary index of n) minus (greatest prime index of n).
17
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,3
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.
FORMULA
a(n) = A070939(n) - A061395(n) = A029837(n) - A061395(n) for n > 1.
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}]
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.
Sequence in context: A068446 A253830 A167625 * A107261 A265336 A219782
KEYWORD
sign,base
AUTHOR
Gus Wiseman, May 07 2024
STATUS
approved