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 A065862 #12 Feb 21 2020 13:24:17 %S A065862 0,0,0,1,0,0,2,3,1,0,2,0,1,0,7,6,7,6,8,8,7,6,7,6,6,5,4,4,6,5,6,6,5,4, %T A065862 3,2,4,3,2,1,2,2,4,3,2,1,2,2,1,0,0,0,1,0,38,38,39,39,40,41,42,42,42, %U A065862 42,43,43,44,44,44,44,45,46,47,47,48,49,49,49,51,52,52,52,54,54,54,54,54 %N A065862 Remainder when n-th composite number is divided by the number of nonprimes not exceeding n. %H A065862 Harry J. Smith, <a href="/A065862/b065862.txt">Table of n, a(n) for n = 1..1000</a> %F A065862 a(n) = c(n) mod (n - pi(n)) = A002808(n) mod (n - A000720(n)) = A002808(n) mod A062298(n). %t A065862 Module[{nn=150,cmps,len},cmps=Select[Range[nn],CompositeQ];len=Length[ cmps];Mod[#[[1]],#[[2]]-PrimePi[#[[2]]]]&/@Thread[{cmps,Range[len]}]] (* _Harvey P. Dale_, Feb 21 2020 *) %o A065862 (PARI) Composite(n) = { local(k); k=n + primepi(n) + 1; while (k != n + primepi(k) + 1, k = n + primepi(k) + 1); return(k) } { for (n = 1, 1000, a=Composite(n)%(n - primepi(n)); write("b065862.txt", n, " ", a) ) } \\ _Harry J. Smith_, Nov 02 2009 %Y A065862 Cf. A002808, A000720, A062298, A065858-A065864, A065134. %K A065862 nonn %O A065862 1,7 %A A065862 _Labos Elemer_, Nov 26 2001