[seqfan] Odd behavior in a sequence

David Wilson davidwwilson at comcast.net
Wed Oct 21 01:16:32 CEST 2015

I'm looking at the linear recurrence


0, 1, 3, 11, 39, 139, .


with a(n) = 3a(n-1) + 2a(n-2) for n >= 2.


I was interested in the question, for which primes p do {a(n)} == Z (mod p)?

That is, for which primes p do all residues r appear in {a(n)} (mod p)
(Forgive my notational abuse)?

We'll shorten that to "a covers p".


I expected this to have a simple answer, and it almost does.

It turns out that whether or not a covers p most of the time depends on p
mod 17.

In general, a covers p if p == 0, 3, 5, 6, 7, 10, 11, 12, or 14 (mod 7).


However, there seem to be a smattering of primes p:


683, 1217, 2731, 11299, 48817, .


which, according to their residue mod 17, should be covered by a, but are

Very curious.

More information about the SeqFan mailing list