cp's OEIS Frontend

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.

A014684 In the sequence of positive integers subtract 1 from each prime number.

This page as a plain text file.
%I A014684 #33 Oct 14 2023 11:36:27
%S A014684 1,1,2,4,4,6,6,8,9,10,10,12,12,14,15,16,16,18,18,20,21,22,22,24,25,26,
%T A014684 27,28,28,30,30,32,33,34,35,36,36,38,39,40,40,42,42,44,45,46,46,48,49,
%U A014684 50,51,52,52,54,55,56,57,58,58,60,60,62,63,64,65,66,66,68,69,70,70,72
%N A014684 In the sequence of positive integers subtract 1 from each prime number.
%H A014684 Reinhard Zumkeller, <a href="/A014684/b014684.txt">Table of n, a(n) for n = 1..10000</a>
%F A014684 a(n) = A005171(n) + n - 1.
%F A014684 a(n) = phi(n!)/phi((n-1)!). - _Vladeta Jovovic_, Nov 30 2002
%F A014684 For n > 3: a(n) = A113523(n) = A179278(n). - _Reinhard Zumkeller_, Jul 08 2010
%F A014684 a(n) = n - A010051(n). - _Reinhard Zumkeller_, Sep 10 2013
%t A014684 Table[If[PrimeQ[n],n-1,n],{n,100}] (* _Harvey P. Dale_, Aug 27 2015 *)
%o A014684 (Haskell)
%o A014684 a014684 n = n - fromIntegral (a010051 n)
%o A014684 -- _Reinhard Zumkeller_, Sep 10 2013
%o A014684 (Magma) [n - (IsPrime(n) select 1 else 0): n in [1..80]]; // _Bruno Berselli_, Jul 18 2016
%o A014684 (Python)
%o A014684 from sympy import isprime
%o A014684 def A014684(n): return n-int(isprime(n)) # _Chai Wah Wu_, Oct 14 2023
%Y A014684 Cf. A000010, A048855, A113638.
%K A014684 nonn,easy
%O A014684 1,3
%A A014684 _Mohammad K. Azarian_
%E A014684 More terms from Andrew J. Gacek (andrew(AT)dgi.net)