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.
%I A216846 #36 Dec 07 2012 15:21:57 %S A216846 3,4,5,6,8,9,10,11,12,13,14,15,16,18,19,20,21,22,24,25,26,27,28,29,30, %T A216846 32,33,34,35,36,37,38,39,40,42,44,45,46,48,49,50,51,52,53,54,55,56,57, %U A216846 58,59,60,61,62,63,64,65,66,67,68,69,70,72,74,75,76,77,78 %N A216846 Union of the composite numbers and the primes for which 2 is a primitive root. %C A216846 This is the complement of A216838 (primes for which 2 is not a primitive root). [_V. Raman_, Dec 01 2012] %t A216846 nn = 100; Union[Select[Range[2, nn], ! PrimeQ[#] &], Select[Prime[Range[2, PrimePi[nn]]], PrimitiveRoot[#] == 2 &]] (* _T. D. Noe_, Sep 19 2012 *) %o A216846 (PARI) for(i=1, 100, if(isprime(i), if(znorder(Mod(2, i))!=(i-1), print1(i, ", ")), print1(i, ", "))); /* _V. Raman_, Sep 17 2012 */ %o A216846 (PARI) %o A216846 is_A216846(n) = if( !isprime(n), 1, if(znorder(Mod(2,n))==n-1, 1, 0) ); %o A216846 for(n=3,100,if(is_A216846(n),print1(n,", "))); %o A216846 /* _Joerg Arndt_, Oct 15 2012 */ %Y A216846 Cf. A002326, A001122, A216838. %K A216846 nonn %O A216846 1,1 %A A216846 _V. Raman_, Sep 17 2012