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.
%I A066136 #22 Dec 14 2024 20:30:12 %S A066136 0,1,2,1,3,2,4,3,4,5,5,6,6,7,8,9,7,10,8,11,12,13,9,14,15,16,17,18,10, %T A066136 19,11,20,21,22,23,24,12,25,26,27,13,28,14,29,30,31,15,32,33,34,35,36, %U A066136 16,37,38,39,40,41,17,42,18,43,44,45,46,47,19,48,49,50,20,51,21,52,53 %N A066136 Primes are replaced by their local sequence number in A000040, while composites are replaced by their sequence number in A002808; (a kind of eigen- or home-indexing). %C A066136 Primality or compositeness is recognizable from the terms: if successor of a term(>2) is larger by one than the term, then it labels a composite number. %H A066136 Harry J. Smith, <a href="/A066136/b066136.txt">Table of n, a(n) for n=1..1000</a> %F A066136 a(n) = pi(n) if n is prime; a(n) = n-pi(n)-1 if n is not prime. %F A066136 a(n) = A026238(n), n>1. - _R. J. Mathar_, Sep 30 2008 %t A066136 Do[s=n; If[PrimeQ[n], Print[PrimePi[n]]]; If[ !PrimeQ[n], Print[n-PrimePi[n]-1]], {n, 1, 1000}] %o A066136 (PARI) a(n) = { if (isprime(n), primepi(n), n - primepi(n) - 1) } \\ _Harry J. Smith_, Feb 02 2010 %Y A066136 Cf. A000040, A000720, A002808, A026238. %K A066136 nonn %O A066136 1,3 %A A066136 _Labos Elemer_, Dec 07 2001