A227740 Integers from 0 to A037834(n) followed by integers from 0 to A037834(n+1) and so on.
0, 0, 1, 0, 0, 1, 0, 1, 2, 0, 1, 0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4, 0, 1, 2, 3, 0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 0, 0, 1, 0, 1, 2, 0, 1, 2, 3
Offset: 1
Keywords
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..2272
Programs
-
Mathematica
Table[Range[0, #] &@ Total@ Flatten@ Map[Abs@ Differences@ # &, Partition[IntegerDigits[n, 2], 2, 1]], {n, 34}] // Flatten (* Michael De Vlieger, May 09 2017 *)
-
Scheme
(define (A227740 n) (- n (+ 1 (A173318 (- (A227737 n) 1)))))
Comments