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.

A039704 a(n) = n-th prime modulo 6.

This page as a plain text file.
%I A039704 #25 Dec 12 2024 09:29:21
%S A039704 2,3,5,1,5,1,5,1,5,5,1,1,5,1,5,5,5,1,1,5,1,1,5,5,1,5,1,5,1,5,1,5,5,1,
%T A039704 5,1,1,1,5,5,5,1,5,1,5,1,1,1,5,1,5,5,1,5,5,5,5,1,1,5,1,5,1,5,1,5,1,1,
%U A039704 5,1,5,5,1,1,1,5,5,1,5,1,5,1,5,1,1,5,5,1,5,1,5,5,1,5,1,5,5,5,1,1,1,5,5,5,1
%N A039704 a(n) = n-th prime modulo 6.
%H A039704 Nathaniel Johnston, <a href="/A039704/b039704.txt">Table of n, a(n) for n = 1..10000</a>
%F A039704 Sum_k={1..n} a(k) ~ 3*n. - _Amiram Eldar_, Dec 11 2024
%p A039704 seq(ithprime(n) mod 6, n=1..105); # _Nathaniel Johnston_, Jun 29 2011
%t A039704 Table[Mod[Prime[n], 6], {n, 105}] (* _Nathaniel Johnston_, Jun 29 2011 *)
%t A039704 Mod[Prime[Range[100]], 6] (* _Vincenzo Librandi_, May 06 2014 *)
%o A039704 (PARI) primes(105)%6 \\ _Zak Seidov_, Mar 25 2012
%o A039704 (Magma) [p mod 6: p in PrimesUpTo(500)]; // _Vincenzo Librandi_, May 06 2014
%Y A039704 Cf. A000040, A039701-A039703, A039705, A039706, A038194, A007652, A039709-A039715.
%K A039704 nonn,easy
%O A039704 1,1
%A A039704 _Clark Kimberling_