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 A141468 #52 Oct 12 2024 09:06:11 %S A141468 0,1,4,6,8,9,10,12,14,15,16,18,20,21,22,24,25,26,27,28,30,32,33,34,35, %T A141468 36,38,39,40,42,44,45,46,48,49,50,51,52,54,55,56,57,58,60,62,63,64,65, %U A141468 66,68,69,70,72,74,75,76,77,78,80,81,82,84,85,86,87,88 %N A141468 Zero together with the nonprime numbers A018252. %C A141468 0 and 1 together with the composite numbers (A002808). - _Omar E. Pol_, Jul 04 2009 %H A141468 N. J. A. Sloane, <a href="/A141468/b141468.txt">Table of n, a(n) for n = 1..17739</a> %F A141468 a(1) = 0; a(n) = A018252(n-1), n > 1. - _Omar E. Pol_, Aug 13 2009 %F A141468 a(n) = A018252(n) - A054546(n). - _Omar E. Pol_, Oct 21 2011 %F A141468 a(n) = A002808(n-2) for n > 2 . - _Robert G. Wilson v_, Jan 29 2015, corrected by _Rémi Guillaume_, Aug 26 2024. %p A141468 A141468 := proc(n) option remember; local a; if n <=2 then n-1 ; else for a from procname(n-1)+1 do if not isprime(a) then return a; end if; end do; end if; end proc: # _R. J. Mathar_, Dec 13 2010 %t A141468 nonPrime[n_Integer] := FixedPoint[n + PrimePi@# &, n + PrimePi@ n]; Array[ nonPrime, 66, 0] (* _Robert G. Wilson v_, Jan 29 2015 *) %t A141468 Join[{0,1},Select[Range[100],CompositeQ]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Oct 22 2017 *) %o A141468 (Haskell) %o A141468 a141468 n = a141468_list !! (n-1) %o A141468 a141468_list = 0 : a018252_list -- _Reinhard Zumkeller_, May 31 2013 %o A141468 (PARI) a(n) = my(k=0); n--; while(-n+n+=-k+k=primepi(n), ); n; \\ _Ruud H.G. van Tol_, Jul 15 2024 %o A141468 (PARI) list(lim)=if(lim<1, return(if(lim<0,[],[0]))); my(v=List([0,1])); forcomposite(n=4,lim\1, listput(v,n)); Vec(v) \\ _Charles R Greathouse IV_, Jul 15 2024 %o A141468 (Python) %o A141468 from sympy import composite %o A141468 def A141468(n): return n-1 if n < 3 else composite(n-2) # _Chai Wah Wu_, Oct 11 2024 %Y A141468 Cf. A018252, A002808, A054546 (first differences). %K A141468 nonn %O A141468 1,3 %A A141468 _Juri-Stepan Gerasimov_, Aug 11 2008 %E A141468 Added 68 by _R. J. Mathar_, Aug 14 2008 %E A141468 Better definition from _Omar E. Pol_, Jun 30 2009