A048728 Differences between A008585 (multiples of 3) and A048724.
0, 0, 0, 4, 0, 0, 8, 12, 0, 0, 0, 4, 16, 16, 24, 28, 0, 0, 0, 4, 0, 0, 8, 12, 32, 32, 32, 36, 48, 48, 56, 60, 0, 0, 0, 4, 0, 0, 8, 12, 0, 0, 0, 4, 16, 16, 24, 28, 64, 64, 64, 68, 64, 64, 72, 76, 96, 96, 96, 100, 112, 112, 120
Offset: 0
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Programs
-
Haskell
a048728 n = a008585 n - a048724 n -- Reinhard Zumkeller, May 13 2014
-
PARI
a(n)=3*n - bitxor(2*n, n) \\ Charles R Greathouse IV, Oct 03 2016
-
Python
def a(n): return 3*n - (2*n^n) # Indranil Ghosh, Jun 13 2017
Formula
a(n) = n*3 - Xmult(n, 3).