# Increasing integral sequence of intermediate growth which is periodic modulo almost all primes

Many integral sequences are periodic modulo (almost) all primes. However all examples I know are either evaluations of suitable polynomials on consecutive integers (trivial examples) or grow at least exponentially fast.

Is there an interesting example with subexpontial growth (ie. the $n$-th term is eventually smaller than $(1+\epsilon)^n$ for every strictly positive $\epsilon$)?

In some sense, the interesting question is perhaps: Can an integral sequence of intermediary growth have "natural" (nice and elementary in some sense) arithmetic properties?

I used "natural arithmetic properties" in order to exclude for example the partition function. It has intermediary growth and it has definitively interesting arithmetic properties, but nobody would call them elementary, I think. (Except perhaps reincarnations of Ramanujan.)

Added: Observe that some "strong" condition is needed in order to exclude sequences of intermediate growth. $1,2!,2!,3!,3!,3!,\dots,4!,4!,\dots$ with suitably repeated terms can have intermediate growth and has only finitely many non-zero terms modulo every prime-number.

• Interleaving periodic sequences is again periodic. I suppose this is trivial for you: $a(2n)=poly_1(n),a(2n+1)=poly_2(n)$? – joro Jul 22 '15 at 12:00
• joro, thanks for your remark. You are right, I consider this to be trivial. – Roland Bacher Jul 22 '15 at 14:35
• Another construction, that I suspect you will want to exclude, is to take an exponentially growing pan-periodic sequence (like $2^n$) and replace the $n$th term by its least nonnegative residue modulo the product of all the primes up to $\sqrt n$, say. This sequence grows slower than $(e+\epsilon)^{\sqrt n}$ and, modulo any fixed prime, is congruent to the original sequence after finitely many terms. – Greg Martin Jul 22 '15 at 19:15