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 A233919 #6 Dec 08 2015 01:51:45 %S A233919 1,2,4,6,18,42,111,279,752,1990,5376,14707,40465,111970,311997,873239, %T A233919 2455818,6933060,19640273,55813426,159047591,454373344,1301016216, %U A233919 3733009232,10731465131,30904208376,89140202911,257498974953,744861243809,2157405104355 %N A233919 a(n) is the number of noncomposites (primes or 1) that are n digits long in balanced ternary notation. %t A233919 BTSeg[d_Integer] := Module[{}, {3^d - (3^d - 1)/2, 3^d + (3^d - 1)/2}]; %t A233919 Table[s = BTSeg[d]; PrimePi[Ceiling[s[[2]]/2]*2] - PrimePi[s[[1]] - 1], {d, 0, 29}] %Y A233919 Cf. A004676, A162145. %K A233919 nonn,base %O A233919 1,2 %A A233919 _Lei Zhou_, Dec 17 2013