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 A257689 #19 Dec 10 2021 07:24:41 %S A257689 1,2,3,5,7,11,13,17,19,23,25,29,31,37,41,43,47,53,59,61,67,71,73,77, %T A257689 79,83,89,91,97,101,103,107,109,113,115,119,121,127,131,137,139,143, %U A257689 149,151,157,161,163,167,173,175,179,181,191,193,197,199,209,211,221,223,227,229,233,235,239,241,247,251,257,263,265 %N A257689 Numbers that are either ludic or prime. %H A257689 Antti Karttunen, <a href="/A257689/b257689.txt">Table of n, a(n) for n = 1..10181</a> %t A257689 a3309[nmax_] := a3309[nmax] = Module[{t = Range[2, nmax], k, r = {1}}, While[Length[t] > 0, k = First[t]; AppendTo[r, k]; t = Drop[t, {1, -1, k}]]; r]; %t A257689 ludicQ[n_, nmax_] /; 1 <= n <= nmax := MemberQ[a3309[nmax], n]; %t A257689 terms = 1000; %t A257689 f[nmax_] := f[nmax] = Select[Range[nmax], ludicQ[#, nmax] || PrimeQ[#]&] // PadRight[#, terms]&; %t A257689 f[nmax = terms]; %t A257689 f[nmax = 2 nmax]; %t A257689 While[f[nmax] != f[nmax/2], nmax = 2 nmax]; %t A257689 seq = f[nmax] (* _Jean-François Alcover_, Dec 10 2021, after _Ray Chandler_ in A003309 *) %o A257689 (Scheme, with _Antti Karttunen_'s IntSeq-library) %o A257689 (define A257689 (MATCHING-POS 1 1 (lambda (n) (or (= 1 (A192490 n)) (= 1 (A010051 n)))))) %Y A257689 Union of primes (A000040) and ludic numbers (A003309). %Y A257689 Cf. A192506 (complement, neither ludic nor prime), A192503 (ludic and prime), A192504 (ludic and nonprime), A192505 (nonludic and prime). %Y A257689 Differs from A206074(n-1), A186891(n) and A257688(n) for the first time at n=19, where a(19) = 59, while A206074(18) = A186891(19) = A257688(19) = 55, a term missing from here. %Y A257689 Differs from A257691 for the first time at n=24, where a(24) = 77, while A257691(24) = 79. %K A257689 nonn %O A257689 1,2 %A A257689 _Antti Karttunen_, May 07 2015