login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A255064 Number of times an odious number is encountered when iterating from 2^(n+1)-2 to (2^n)-2 with the map x -> x - (number of runs in binary representation of x). 7

%I #19 Jun 03 2018 02:04:46

%S 0,1,1,1,3,4,9,15,29,45,94,155,318,548,1088,1976,3812,7115,13617,

%T 25733,49247,93739,179691,343816,660735,1270112,2448975,4727786,

%U 9146539,17717760,34366228,66718749,129619199,251958752,489959621,953155315,1854898028

%N Number of times an odious number is encountered when iterating from 2^(n+1)-2 to (2^n)-2 with the map x -> x - (number of runs in binary representation of x).

%F a(n) = Sum_{k = A255062(n) .. A255061(n+1)} A254114(k).

%F a(n) = Sum_{k = A255062(n) .. A255061(n+1)} A010060(A255066(k)).

%F Other identities. For all n >= 1:

%F a(n) = A255071(n) - A255063(n).

%e For n=0 we count the odious numbers (A000069) found in range A255056(0..0), and A255056(0) = 0 is not an odious number, thus a(0) = 0.

%e For n=1 we count the odious numbers in range A255056(1..1), and A255056(1) = 2 is an odious number, thus a(1) = 1.

%e For n=2 we look at the numbers in range A255056(2..3), i.e. 4 and 6 and while 4 is an odious number, 6 is not, thus a(2) = 1.

%e For n=5 we look at the numbers in range A255056(12..20) which are (32, 36, 42, 46, 50, 54, 58, 60, 62), or if we take them in the order the come when iterating A236840 (as in A255066(12..20): 62, 60, 58, 54, 50, 46, 42, 36, 32), that is, we start iterating with map m(n) = A236840(n) from the initial value (2^(5+1))-2 = 62. Thus we get m(62) = 60, m(60) = 58, m(58) = 54, m(54) = 50, m(50) = 46, m(46) = 42, m(42) = 36 and finally m(36) = 32 which is (2^5). Of the nine numbers encountered, only 62, 50, 42 and 32 are odious numbers, thus a(5) = 4.

%o (PARI) \\ Use the Pari-code given in A255063.

%o (Scheme, different versions)

%o (define (A255064 n) (if (zero? n) n (let loop ((i (- (expt 2 (+ 1 n)) 4)) (s (modulo n 2))) (cond ((pow2? (+ 2 i)) s) (else (loop (- i (A005811 i)) (+ s (A010060 i))))))))

%o (define (A255064 n) (add A254114 (A255062 n) (A255061 (+ 1 n))))

%o (define (A255064 n) (add (COMPOSE A010060 A255066) (A255062 n) (A255061 (+ 1 n))))

%Y Cf. A000069, A005811, A010060, A236840, A254114, A255056, A255063, A255066, A255071.

%Y Similar sequences: A255126, A218543.

%K nonn

%O 0,5

%A _Antti Karttunen_, Feb 14 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 08:59 EDT 2024. Contains 371935 sequences. (Running on oeis4.)