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.

A236675 If n is prime, then a(n) is the least composite number not occurring earlier, else a(n) is the least prime not occurring earlier.

This page as a plain text file.
%I A236675 #13 Feb 07 2014 08:40:54
%S A236675 2,4,6,3,8,5,9,7,11,13,10,17,12,19,23,29,14,31,15,37,41,43,16,47,53,
%T A236675 59,61,67,18,71,20,73,79,83,89,97,21,101,103,107,22,109,24,113,127,
%U A236675 131,25,137,139,149,151,157,26,163,167,173,179,181,27,191,28,193
%N A236675 If n is prime, then a(n) is the least composite number not occurring earlier, else a(n) is the least prime not occurring earlier.
%C A236675 If "composite" is replaced by "nonprime", one gets A026234, a permutation of the integers.
%F A236675 a(n) = A002808(A000720(n)) if n is prime, a(n) = A000040(n-A000720(n)) else.
%o A236675 (PARI) A236675=n->if(isprime(n),A002808(primepi(n)),prime(n-primepi(n)))
%o A236675 (PARI) c=p=1;vector(99,n,if(isprime(n),while(isprime(c++),);c,p=nextprime(p+1)))
%Y A236675 Cf. A026234, A002808, A018252, A097457, A236675.
%K A236675 nonn
%O A236675 1,1
%A A236675 _M. F. Hasler_, Jan 29 2014