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.

A099618 a(n) = 1 if the n-th prime == 1 mod 6, otherwise a(n) = 0.

This page as a plain text file.
%I A099618 #15 Mar 14 2025 09:00:47
%S A099618 0,0,0,1,0,1,0,1,0,0,1,1,0,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,0,1,0,0,1,
%T A099618 0,1,1,1,0,0,0,1,0,1,0,1,1,1,0,1,0,0,1,0,0,0,0,1,1,0,1,0,1,0,1,0,1,1,
%U A099618 0,1,0,0,1,1,1,0,0,1,0,1,0,1,0,1,1,0,0,1,0,1,0,0,1,0,1,0,0,0,1,1,1,0,0,0,1
%N A099618 a(n) = 1 if the n-th prime == 1 mod 6, otherwise a(n) = 0.
%H A099618 Amiram Eldar, <a href="/A099618/b099618.txt">Table of n, a(n) for n = 1..10000</a>
%H A099618 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.
%F A099618 From _Amiram Eldar_, Mar 14 2025: (Start)
%F A099618 a(n) = 1 - A132194(m).
%F A099618 Sum_{k=1..n} a(k) ~ n / 2. (End)
%t A099618 Table[Mod[Mod[Mod[Mod[Prime[k], 6], 5], 3], 2], {k, 1, 120}]
%t A099618 a[n_] := Boole[Mod[Prime[n], 6] == 1]; Array[a, 120] (* _Amiram Eldar_, Mar 14 2025 *)
%o A099618 (PARI) a(n) = (prime(n) % 6) == 1; \\ _Michel Marcus_, Jun 26 2019
%Y A099618 Characteristic function of A091178.
%Y A099618 Cf. A000040, A039704, A132194.
%K A099618 nonn,easy
%O A099618 1,1
%A A099618 Joseph Biberstine (jrbibers(AT)indiana.edu), Nov 19 2004