# would like to find patterns over a decimal expansion

**URL:** <https://community.wolfram.com/t/would-like-to-find-patterns-over-a-decimal-expansion/4403>\
**Category:** Questions\
**Tags:** computer-science, data-science, software-development\
**Created:** [December 25, 2014, 5:55pm UTC](https://community.wolfram.com/t/would-like-to-find-patterns-over-a-decimal-expansion/4403 "2014-12-25T17:55:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpheard](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@jpheard](https://community.wolfram.com/u/jpheard)\
**Post date:** [December 25, 2014, 5:55pm UTC](https://community.wolfram.com/t/would-like-to-find-patterns-over-a-decimal-expansion/4403/1 "2014-12-25T17:55:27Z")

</div>

Hi, I am working with the summation of 1/((10^ns)-1) where n min is 1 and max is a large number and s is the “spread” variable. The decimal expansion of this summation effectively gives the number of divisors in each numbers placeholder. It tells which numbers are prime because they only have 2 divisors (of 1 and the number itself) in the prime placeholders. The initial decimal expansion looks like this,

.1223242434262 …

You can see there is a 2 at the 2,3,5,7,11,and 13th placeholders, all prime.  
and with the spread variable set at a number, let’s say 3 for example, that would then look like this,

.001002002003002004002004003004002006002 …

The spread variable helps of avoid carry-over into other placeholders when the divisors of a number are as great as 10. With the above example, carry-over protection would be provided up to 999 divisors. I already have a way of safely determining the spread variable that I’m not going to get into here.

What I would like to be able to do, is output the summation calculation to a large file on a new 6 TerraByte Hardrive, then be able to search the file for each instance of 2 or .002 or whatever depending on the what the spread is set at, and have this operation output a list of these prime placeholder instances to another file. I would also like to be able to search for mersenne primes, so that would entail searching for numbers of the (2^n)-1 format and seeing if it is a 2 at that location. I have no idea how to work with lists in Mathematica and I would greatly appreciate the help with my new exploration into prime number theory.
