cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A131261 a(0)=3; for n>0, a(n) = smallest odd prime not occurring earlier in the sequence such that a(n-1)+a(n) is a multiple of n.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 23, 41, 31, 29, 37, 47, 83, 43, 107, 53, 151, 101, 89, 71, 97, 79, 59, 61, 139, 173, 313, 163, 127, 113, 73, 311, 283, 193, 157, 131, 239, 103, 443, 197, 541, 257, 431, 229, 401, 887, 241, 191, 397, 353, 463, 109, 421, 227, 433, 631, 167
Offset: 0

Views

Author

David Applegate, Oct 26 2007

Keywords

Comments

Is this sequence infinite and, if so, is it a permutation of the odd primes?
An analog of A134204, but using only the odd primes.

Crossrefs

Cf. A134204.

Programs

  • Mathematica
    a = {3}; For[n = 1, n < 60, n++, i = 2; While[Length[Intersection[{Prime[i]}, a]] == 1 || Not[Mod[a[[ -1 ]] + Prime[i], n] == 0], i++ ]; AppendTo[a, Prime[i]]]; a (* Stefan Steinerberger, Oct 30 2007 *)