A275464 a(n) = n - A038802(n).
0, 0, 0, 3, 1, 1, 6, 2, 2, 9, 3, 10, 12, 5, 5, 15, 15, 7, 18, 8, 8, 21, 9, 21, 24, 11, 25, 27, 13, 13, 30, 30, 15, 33, 16, 16, 36, 35, 18, 39, 19, 40, 42, 21, 42, 45, 45, 24, 48, 25, 25, 51, 26, 26, 54, 27, 55, 57, 56, 56, 60, 60, 33, 63, 34, 63, 66, 36, 36, 69, 67, 70, 72, 40, 40, 75, 75, 42, 78, 77, 44, 81
Offset: 1
Keywords
Examples
9 = (2^0)*(3^2), resulting in 1 zero. So, a(4) = 4 - 1 = 3.
Links
- Raphael Ranna, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A038802.
Programs
-
Mathematica
Table[f = FactorInteger[2 n + 1]; n - (PrimePi[f[[1, 1]]] - 1), {n, 100}]
-
PARI
lpf(n)=factor(n)[1,1] a(n)=n - primepi(lpf(2*n+1)) + 1 \\ Charles R Greathouse IV, Jul 29 2016
Formula
a(n) = n + O(n/log n). - Charles R Greathouse IV, Jul 29 2016
Extensions
Duplicate a(44)-a(45) removed by Andrew Howroyd, Feb 23 2018