I have a summation which yields a prime number at each location there is a 2, and I do not know how to search for the 2's.
N[Sum[1/(10^(n*4) - 1), {n, 1, 100}], 10^2*4]
0.0001000200020003000200040002000400030004000200060002000400040005000200060002000600040004000200080003000400040006000200080002000600040004000400090002000400040008000200080002000600060004000200100003000600040006000200080004000800040004000200120002000400060007000400080002000600040008000200120002000400060006000400080002001000050004000200120004000400040008000200120004000600040004000400120002000600060009000
In the above example, I want to find the positions of the form/pattern 0002
in the output. It should yield all the prime locations under 100. I have tried using Position[list,form]
by putting the expression in for the list and putting the Out
in for the list, without success. Do I have to make a list first out of the decimal output, and if so, how do I make a list with chunks of 4 digits, and then search it? Below is what I've tried.
Position[N[Sum[1/(10^(n*4) - 1), {n, 1, 10}], 10^2*4], 2]
{}
Position[%%, 0002]
{}