OFFSET
1,1
COMMENTS
Equivalently, sums of three distinct powers of 2.
Appears to give all n such that 64 is the highest power of 2 dividing A005148(n). - Benoit Cloitre, Jun 22 2002
From Gus Wiseman, Oct 05 2020: (Start)
These are numbers k such that the k-th composition in standard order has length 3. The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions. The sequence together with the corresponding standard compositions begins:
7: (1,1,1) 44: (2,1,3) 97: (1,5,1)
11: (2,1,1) 49: (1,4,1) 98: (1,4,2)
13: (1,2,1) 50: (1,3,2) 100: (1,3,3)
14: (1,1,2) 52: (1,2,3) 104: (1,2,4)
19: (3,1,1) 56: (1,1,4) 112: (1,1,5)
21: (2,2,1) 67: (5,1,1) 131: (6,1,1)
22: (2,1,2) 69: (4,2,1) 133: (5,2,1)
25: (1,3,1) 70: (4,1,2) 134: (5,1,2)
26: (1,2,2) 73: (3,3,1) 137: (4,3,1)
28: (1,1,3) 74: (3,2,2) 138: (4,2,2)
35: (4,1,1) 76: (3,1,3) 140: (4,1,3)
37: (3,2,1) 81: (2,4,1) 145: (3,4,1)
38: (3,1,2) 82: (2,3,2) 146: (3,3,2)
41: (2,3,1) 84: (2,2,3) 148: (3,2,3)
42: (2,2,2) 88: (2,1,4) 152: (3,1,4)
(End)
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Robert Baillie, Summing the curious series of Kempner and Irwin, arXiv:0806.4410 [math.CA], 2008-2015. See p. 18 for Mathematica code irwinSums.m.
Stephen Morley, HAKMEM Item 175 (Gosper).
Tilman Piesk, First 56 elements in a tetrahedral array.
FORMULA
A000120(a(n)) = 3. - Reinhard Zumkeller, May 03 2012
Start with A084468. If n is in sequence, then 2n is too. - Ralf Stephan, Aug 16 2013
a(n+1) = A057168(a(n)). - M. F. Hasler, Aug 27 2014
Sum_{n>=1} 1/a(n) = A367110 = 1.428591545852638123996854844400537952781688750906133068397189529775365950039... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022
MATHEMATICA
Select[Range[200], (Count[IntegerDigits[#, 2], 1] == 3)&]
nn = 8; Flatten[Table[2^i + 2^j + 2^k, {i, 2, nn}, {j, 1, i - 1}, {k, 0, j - 1}]] (* T. D. Noe, Nov 05 2013 *)
PROG
(Haskell)
a014311 n = a014311_list !! (n-1)
a014311_list = [2^x + 2^y + 2^z |
x <- [2..], y <- [1..x-1], z <- [0..y-1]]
-- Reinhard Zumkeller, May 03 2012
(C)
unsigned hakmem175(unsigned x) {
unsigned s, o, r;
s = x & -x; r = x + s;
o = r ^ x; o = (o >> 2) / s;
return r | o;
}
unsigned A014311(int n) {
if (n == 1) return 7;
return hakmem175(A014311(n - 1));
} // Peter Luschny, Jan 01 2014
(PARI) for(n=0, 10^3, if(hammingweight(n)==3, print1(n, ", "))); \\ Joerg Arndt, Mar 04 2014
(PARI) print1(t=7); for(i=2, 50, print1(", "t=A057168(t))) \\ M. F. Hasler, Aug 27 2014
(Python)
A014311_list = [2**a+2**b+2**c for a in range(2, 6) for b in range(1, a) for c in range(b)] # Chai Wah Wu, Jan 24 2021
CROSSREFS
Cf. A057168.
Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023689, A023690, A023691 (Hammingweight = 1, 2, ..., 9).
A000217(n-2) counts compositions into three parts.
A337453 is the strict case.
A337461 counts the coprime case.
A033992 lists numbers divisible by exactly three different primes.
A323024 lists numbers with exactly three different prime multiplicities.
KEYWORD
nonn,base,easy
AUTHOR
Al Black (gblack(AT)nol.net)
EXTENSIONS
Extension and program by Olivier Gérard
STATUS
approved