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 A068877 #16 Mar 08 2020 00:04:22 %S A068877 7,89,983,8969,98981,898987,9898921,89898983,989898989,8989898969, %T A068877 98989898981,898989898987,9898989898901,89898989898967, %U A068877 989898989898943,8989898989898969,98989898989898981,898989898989898943,9898989898989898789 %N A068877 Largest n-digit prime with property that digits alternate in parity. %H A068877 Giovanni Resta, <a href="/A068877/b068877.txt">Table of n, a(n) for n = 1..500</a> %e A068877 a(4) = 8969 as 8, 9, 6 and 9 have even and odd parity alternately. %o A068877 (Sage) %o A068877 concat = lambda x: Integer(''.join(map(str,x)),base=10) %o A068877 def A068877(n): %o A068877 dd = {0:range(0,10,2)[::-1], 1: range(1,10,2)[::-1]} %o A068877 for d0 in [1..9][::-1]: %o A068877 if n % 2 == 0 and d0 % 2 == 1: continue # optimization %o A068877 ds = [dd[(d0+1+i) % 2] for i in range(n-1)] %o A068877 for dr in cartesian_product(ds): %o A068877 c = concat([d0]+dr) %o A068877 if is_prime(c): return c # [_D. S. McNeil_, Apr 02 2011] %Y A068877 Cf. A030144, A068876. %K A068877 nonn,base %O A068877 1,1 %A A068877 _Amarnath Murthy_, Mar 19 2002 %E A068877 a(15)-a(19) from _Donovan Johnson_, Apr 01 2011