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.

A080339 Characteristic function of {1} union {primes}: 1 if n is 1 or a prime, else 0.

This page as a plain text file.
%I A080339 #68 Apr 13 2025 08:19:06
%S A080339 1,1,1,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,
%T A080339 0,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,
%U A080339 0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0
%N A080339 Characteristic function of {1} union {primes}: 1 if n is 1 or a prime, else 0.
%C A080339 Characteristic function of noncomposite numbers (see A008578). - _Omar E. Pol_, Oct 07 2013
%D A080339 Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 132.
%H A080339 Robert Israel, <a href="/A080339/b080339.txt">Table of n, a(n) for n = 1..10000</a>
%H A080339 Aminu Alhaji Ibrahim and Sa’idu Isah Abubaka, <a href="http://dx.doi.org/10.4236/apm.2016.66028">Aunu Integer Sequence as Non-Associative Structure and Their Graph Theoretic Properties</a>, Advances in Pure Mathematics, 2016, 6, 409-419.
%H A080339 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeFormulas.html">Prime Formulas</a>
%H A080339 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F A080339 a(1)=1, and a(n) = Prod_{k=1...n-1}(k/n)^2 where (a/b) is the Jacobi symbol and n>1. - _Dimitri Papadopoulos_, Jan 13 2016
%p A080339 1,seq(`if`(isprime(i),1,0),i=2..100); # _Robert Israel_, Jan 11 2016
%t A080339 Table[Which[n == 1, 1, PrimeQ[n], 1, True, 0], {n, 110}] (* _Harvey P. Dale_, Oct 03 2011 *)
%t A080339 Table[Boole[PrimeOmega[n] < 2], {n, 100}] (* _Alonso del Arte_, Nov 19 2013 *)
%o A080339 (PARI) a(n) = (n==1) + isprime(n); \\ _Michel Marcus_, Jan 13 2016
%Y A080339 Cf. A010051, A080355.
%Y A080339 Cf. A036234 (partial sums).
%K A080339 nonn,easy
%O A080339 1,1
%A A080339 _N. J. A. Sloane_, Mar 21 2003