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.

A129146 a(n) = n-th odd prime minus n-th odd composite number.

This page as a plain text file.
%I A129146 #13 Sep 21 2024 02:25:10
%S A129146 -6,-10,-14,-14,-14,-16,-16,-16,-16,-18,-14,-14,-14,-16,-12,-10,-14,
%T A129146 -10,-10,-12,-8,-8,-4,2,2,-2,-4,-6,-4,8,10,14,14,20,18,22,22,24,28,32,
%U A129146 28,36,34,36,34,42,52,52,52,50,54,54,62,62,62,66,66,70,72,70,78,90,92,92,92,100,102,110,106,108,112,118,120,124,124,128
%N A129146 a(n) = n-th odd prime minus n-th odd composite number.
%C A129146 For small n's, a(n) is negative, while for large n's, a(n) is positive.
%F A129146 a(n) = A065091(n) - A071904(n).
%o A129146 (Python)
%o A129146 from sympy import primepi, prime
%o A129146 def A129146(n):
%o A129146     if n == 1: return -6
%o A129146     m, k = n, primepi(n) + n + (n>>1)
%o A129146     while m != k:
%o A129146         m, k = k, primepi(k) + n + (k>>1)
%o A129146     return prime(n+1)-m # _Chai Wah Wu_, Aug 01 2024
%Y A129146 Cf. A065091, A071904, A129131, A129145.
%K A129146 sign,easy
%O A129146 1,1
%A A129146 _Zak Seidov_, Apr 01 2007