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.

Showing 1-2 of 2 results.

A211204 a(1) = 2; for n > 1, a(n) > a(n-1) is the smallest prime for which the set {a(1), a(2), ..., a(n)} lacks at least one residue modulo every odd prime less than or equal to a(n).

Original entry on oeis.org

2, 3, 5, 11, 17, 23, 41, 47, 53, 71, 83, 101, 107, 113, 131, 137, 167, 173, 191, 197, 233, 251, 257, 263, 311, 317, 347, 353, 401, 431, 443, 461, 467, 503, 521, 563, 593, 641, 647, 653, 677, 683, 701, 743, 761, 773, 797, 827, 857, 863, 881, 911, 941, 947, 971
Offset: 1

Views

Author

Keywords

Comments

By construction, for every odd prime p > 1, the sequence does not contain a full residue system modulo p. For n >= 4, all differences a(n) - a(n-1) are multiples of 6; otherwise said, a(n) == 5 (mod 6).
Conjecture: The sequence contains infinitely many "twins" with a(n)-a(n-1) = 6.
All terms greater than 3 are 2 mod 3, so the sequence does not contain a complete residue system mod 3; all terms are not 4 mod 5, so the sequence does not contain a complete residue system mod 5; since 7 is absent in the sequence, there is not a complete residue system mod 7.
By the Chinese remainder theorem and Dirichlet's theorem on arithmetic progressions, the sequence is infinite. - Dimiter Skordev, Apr 05 2022

Crossrefs

Cf. A210537.

Programs

  • Python
    def isPrime(n):
        if (n%2==0): return n==2
        for i in range(3,int(n**0.5+1),2):
            if (n%i==0): return False
        return n>1
    def nextPrime(n):
        n=n+1
        while not isPrime(n): n=n+1
        return n
    def a(n):
        p,L,S=2,[],[]
        while len(L)Dimiter Skordev, Apr 05 2022

Extensions

Edited by M. F. Hasler, Feb 13 2013

A220533 a(n) is minimal number such that the set of all composite numbers <= a(n) contains complete residue system modulo n.

Original entry on oeis.org

4, 9, 8, 15, 12, 35, 14, 27, 20, 33, 24, 65, 26, 45, 32, 45, 36, 77, 38, 63, 44, 63, 46, 95, 48, 69, 56, 87, 60, 187, 62, 93, 64, 105, 72, 175, 74, 117, 80, 123, 84, 215, 86, 117, 92, 135, 94, 245, 96, 153, 104, 141, 106, 245, 108, 165, 116
Offset: 1

Views

Author

Vladimir Shevelev, Feb 20 2013

Keywords

Crossrefs

Programs

  • Maple
    A220533 := proc(n)
        local sco,c,ai,scor ;
        sco := {} ;
        for ai from 1 do
            sco := sco union {A002808(ai)} ;
            scor := convert( [seq(c mod n,c=sco)], set) ;
            if nops(scor) = n then
                return A002808(ai) ;
            end if;
        end do:
    end proc:
    seq(A220533(n),n=1..60) ; # R. J. Mathar, Feb 27 2013
  • Mathematica
    A002808[n_] := A002808[n] = Module[{a}, If[ n == 1 , 4, For[a = A002808[n-1] + 1 , True, a++, If[! PrimeQ[a], Return [a]]]]]; A220533[n_] := Module[{ sco, c, ai, scor}, sco = {}; For[ai = 1, True, ai++, AppendTo[sco, A002808[ai]] ; scor = Mod[#, n]& /@ sco // Union; If[Length[scor] == n , Return[A002808[ai]]]]]; Table[A220533[n], {n, 1, 57}] (* Jean-François Alcover, Feb 28 2013, translated from R. J. Mathar's Maple program *)

Formula

For odd n, a(n) <= 2n + 2; the equality holds if and only if n + 2 is prime.
a(n)<2*n for 25,33,49,... - R. J. Mathar and Vladimir Shevelev, Feb 28 2013

Extensions

Corrected and extended by R. J. Mathar, Feb 27 2013
Showing 1-2 of 2 results.