login
a(n) = (n-th nonprime) + (number of bits in binary expansion of n-th nonprime).
2

%I #11 May 05 2019 00:36:21

%S 1,2,7,9,12,13,14,16,18,19,21,23,25,26,27,29,30,31,32,33,35,38,39,40,

%T 41,42,44,45,46,48,50,51,52,54,55,56,57,58,60,61,62,63,64,66,68,69,71,

%U 72,73,75,76,77,79,81,82,83,84,85,87,88,89,91,92,93,94,95,97,98,99,100,101

%N a(n) = (n-th nonprime) + (number of bits in binary expansion of n-th nonprime).

%C Here n-th nonprime = A141468(n) and n-th number of bits in binary expansion of n-th nonprime = A163400(n).

%F a(n) ~ n. [_Charles R Greathouse IV_, Dec 21 2011]

%e a(1) = 1 (= 0+1);

%e a(2) = 2 (= 1+1);

%e a(3) = 7 (= 4+3).

%p A141468 := proc(n) option remember; if n = 1 then 0; else for a from procname(n-1)+1 do if not isprime(a) then return a; fi; od: fi; end: A070939 := proc(n) max(1,ilog2(n)+1) ; end: A163400 := proc(n) A070939(A141468(n)) ; end: A163405 := proc(n) A141468(n)+A163400(n) ; end: seq(A163405(n),n=1..120) ; # _R. J. Mathar_, Oct 10 2009

%Y Cf. A141468, A163400.

%K nonn

%O 1,2

%A _Juri-Stepan Gerasimov_, Jul 26 2009