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 A305800 #30 Jul 12 2019 14:07:10 %S A305800 1,2,2,3,2,4,2,5,6,7,2,8,2,9,10,11,2,12,2,13,14,15,2,16,17,18,19,20,2, %T A305800 21,2,22,23,24,25,26,2,27,28,29,2,30,2,31,32,33,2,34,35,36,37,38,2,39, %U A305800 40,41,42,43,2,44,2,45,46,47,48,49,2,50,51,52,2,53,2,54,55,56,57,58,2,59,60,61,2,62,63,64,65,66,2,67,68,69,70,71,72,73,2,74,75,76,2,77,2,78,79,80,2,81,2,82,83,84,2,85,86,87,88,89,90,91,92,93,94,95,96 %N A305800 Filter sequence for a(prime) = constant sequences. %C A305800 Restricted growth sequence transform of A239968. %C A305800 In the following, A stands for this sequence, A305800, and S -> T (where S and T are sequence A-numbers) indicates that for all i, j: S(i) = S(i) => T(i) = T(j). %C A305800 For example, the following implications hold: %C A305800 A -> A300247 -> A305897 -> A077462 -> A101296, %C A305800 A -> A290110 -> A300250 -> A101296. %H A305800 Antti Karttunen, <a href="/A305800/b305800.txt">Table of n, a(n) for n = 1..100000</a> %F A305800 a(1) = 1; for n > 1, a(n) = 2 for prime n, and a(n) = 1+n-A000720(n) for composite n. %t A305800 Join[{1},Table[If[PrimeQ[n],2,1+n-PrimePi[n]],{n,2,150}]] (* _Harvey P. Dale_, Jul 12 2019 *) %o A305800 (PARI) A305800(n) = if(1==n,n,if(isprime(n),2,1+n-primepi(n))); %Y A305800 Cf. A000720, A239968. %Y A305800 Differs from A296073 for the first time at n=125, as a(125) = 96, while A296073(125) = 33. %Y A305800 Cf. also A305900, A305801, A295300, A289626 for other "upper level" filters. %K A305800 nonn %O A305800 1,2 %A A305800 _Antti Karttunen_, Jun 14 2018