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.

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

This page as a plain text file.
%I A220533 #25 Nov 16 2014 15:23:26
%S A220533 4,9,8,15,12,35,14,27,20,33,24,65,26,45,32,45,36,77,38,63,44,63,46,95,
%T A220533 48,69,56,87,60,187,62,93,64,105,72,175,74,117,80,123,84,215,86,117,
%U A220533 92,135,94,245,96,153,104,141,106,245,108,165,116
%N A220533 a(n) is minimal number such that the set of all composite numbers <= a(n) contains complete residue system modulo n.
%F A220533 For odd n, a(n) <= 2n + 2; the equality holds if and only if n + 2 is prime.
%F A220533 a(n)<2*n for 25,33,49,... - _R. J. Mathar_ and _Vladimir Shevelev_, Feb 28 2013
%p A220533 A220533 := proc(n)
%p A220533     local sco,c,ai,scor ;
%p A220533     sco := {} ;
%p A220533     for ai from 1 do
%p A220533         sco := sco union {A002808(ai)} ;
%p A220533         scor := convert( [seq(c mod n,c=sco)], set) ;
%p A220533         if nops(scor) = n then
%p A220533             return A002808(ai) ;
%p A220533         end if;
%p A220533     end do:
%p A220533 end proc:
%p A220533 seq(A220533(n),n=1..60) ; # _R. J. Mathar_, Feb 27 2013
%t A220533 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 *)
%Y A220533 Cf. A038026, A210537, A211204.
%K A220533 nonn
%O A220533 1,1
%A A220533 _Vladimir Shevelev_, Feb 20 2013
%E A220533 Corrected and extended by _R. J. Mathar_, Feb 27 2013