|
|
A142150
|
|
The nonnegative integers interleaved with 0's.
|
|
47
|
|
|
0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 31, 0, 32, 0, 33, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, 39, 0, 40, 0, 41, 0, 42, 0, 43, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
Number of vertical pairs in a wheel with n equal sections. - Wesley Ivan Hurt, Jan 22 2012
Also the result of writing n-1 in base 2 and multiplying the last digit with the number with its last digit removed. See A115273 and A257844-A257850 for generalization to other bases. - M. F. Hasler, May 10 2015
Also follows the rule: a(n+1) is the number of terms that are identical with a(n) for a(0..n-1). - Marc Morgenegg, Jul 08 2019
|
|
LINKS
|
|
|
FORMULA
|
a(n) = XOR{k AND (n-k): 0<=k<=n}.
a(n) = (n/2)*0^(n mod 2); a(2*n)=n and a(2*n+1)=0.
a(n) = n*(1+(-1)^n)/4.
G.f.: x^2/(1-x^2)^2.
a(n) = 2*a(n-2)-a(n-4).
Sum_{i=0..n} a(i) = (2*n*(n+1)+(2*n+1)*(-1)^n-1)/16 (see A008805).
(End)
a(n-1) = floor(n/2)*(n mod 2), where (n mod 2) is the parity of n, or remainder of division by 2. - M. F. Hasler, May 10 2015
|
|
MAPLE
|
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
a142150 = uncurry (*) . (`divMod` 2) . (+ 1)
a142150_list = scanl (+) 0 a001057_list
(PARI) a(n)=!bittest(n, 0)*n>>1 \\ M. F. Hasler, May 10 2015
(Python)
|
|
CROSSREFS
|
Cf. A000004, A000027, A000217, A000326, A001057, A001477, A003817, A008805, A027656, A086099, A142149, A142151, A162610, A191967, A195034, A209297.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|