I have a list and want to apply a function just on the second Part
and keep the rest.
t1 = Table[{k, 2^k + 1}, {k, 2, 7}]
yielding
{{2, 5}, {3, 9}, {4, 17}, {5, 33}, {6, 65}, {7, 129}}
I want to FactorInteger
the second part to get
{{2, {5}}, {3, {3}}, {4, {17}}, {5, {3, 11}}, {6, {5, 13}}, {7, {3, 43}}}
By not using Cases
like
Cases[t1, {a_, b_} :> {a, FactorInteger[b][[All, 1]]}]
but by applying a function (maybe Hold
or HoldPattern
) which leaves k
untouched when applying FactorInteger
on the whole of t1
. (I hope it makes sense what I am looking for.)