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.

A175860 a(n) = characteristic function of numbers k such that A175856(m) = k has solution for any m, where A175856(m): a(m) = m for m = noncomposites, a(m) = previous term - 1 for m = composites.

This page as a plain text file.
%I A175860 #7 Nov 08 2018 21:12:49
%S A175860 1,1,1,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,
%T A175860 1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,
%U A175860 1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,0,0,1
%N A175860 a(n) = characteristic function of numbers k such that A175856(m) = k has solution for any m, where A175856(m): a(m) = m for m = noncomposites, a(m) = previous term - 1 for m = composites.
%C A175860 a(n) = characteristic function of numbers from A175857(n). a(n) = 1 if A175856(m) = n for any m, else 0. a(n) = 1 for such n that A175862(n) >= 1. a(n) = 0 for such n that A175862(n) = 0. a(n) + A175861(n) = A000012(n).
%H A175860 Antti Karttunen, <a href="/A175860/b175860.txt">Table of n, a(n) for n = 1..100000</a>
%H A175860 Wikipedia, <a href="https://en.wikipedia.org/wiki/Bertrand%27s_postulate#Generalizations">Bertrand's postulate (Generalizations)</a>
%H A175860 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F A175860 a(n) = 1 - A175861(n).
%o A175860 (PARI)
%o A175860 up_to = 100000;
%o A175860 A175856list(up_to) = { my(v=vector(up_to)); for(n=1,up_to,if((1==n)||isprime(n),v[n] = n,v[n] = v[n-1] - 1)); (v); };
%o A175860 \\ This implementation depends on M. El Bachraoui's proof that there exists a prime between 2n and 3n for n > 1 (see Wikipedia-article).
%o A175860 A175860list(up_to) = { my(v=vector(up_to), A175857 = Set(A175856list(prime(2+primepi(2*up_to))))); for(n=1,up_to,v[n] = (0!=vecsearch(A175857,n))); (v); };
%o A175860 v175860 = A175860list(up_to);
%o A175860 A175860(n) = v175860[n]; \\ _Antti Karttunen_, Nov 08 2018
%Y A175860 Cf. A175856, A175857, A175858, A175859, A175861, A175862.
%K A175860 nonn
%O A175860 1,1
%A A175860 _Jaroslav Krizek_, Sep 29 2010