Search: id:A002516 Results 1-1 of 1 results found. %I A002516 %S A002516 0,3,6,2,12,7,4,10,24,11,14,18,8,15,20,26,48,19,22,34,28,23,36,42,16, %T A002516 27,30,50,40,31,52,58,96,35,38,66,44,39,68,74,56,43,46,82,72,47,84,90, %U A002516 32,51,54,98,60,55,100,106,80,59,62,114,104,63,116,122,192,67,70,130 %N A002516 Earliest sequence with a(a(n))=2n. %H A002516 T. D. Noe, Table of n, a(n) for n=0..1000 %H A002516 R. Stephan, Some divide-and-conquer sequences ... %H A002516 R. Stephan, Table of generating functions %H A002516 Index entries for sequences of the a(a(n)) = 2n family %F A002516 a(4n) = 2*(a(2n)), a(4n+1) = 4n+3, a(4n+2) = 2*(a(2n+1)), a(4n+3) = 8n+2. - Henry Bottomley (se16(AT)btinternet.com), Apr 27 2000 %F A002516 Formulae from Ralf Stephan (ralf(AT)ark.in-berlin.de), Feb 22 2004: a(n) = n + 2*A006519 if odd part of n is of form 4k+1, or 2n - 4*A006519 otherwise. a(2n) = 2a(n), a(2n+1) = 2n + 3 + (2n - 5)[n mod 2]. G.f.: sum(k>=0, 2^k*t(6t^6+t^4+2t^2+3)/(1-t^4)^2, t=x^2^k). %o A002516 (PARI) v2(n)=valuation(n,2) a(n)=2^v2(n)*(-1+3/2*n/2^v2(n)-(-3+1/2*n/ 2^v2(n))*(-1)^((n/2^v2(n)-1)/2)) %o A002516 (PARI) a(n)=local(t): if(n<1,0,if(n%2==0,2*a(n/2),t=(n-1)/2:3*t+1/2-(t-5/ 2)*(-1)^t)) (Ralf Stephan) %Y A002516 Cf. A002517, A007379, A091067. %Y A002516 Sequence in context: A135598 A099506 A154204 this_sequence A073807 A090774 A147995 %Y A002516 Adjacent sequences: A002513 A002514 A002515 this_sequence A002517 A002518 A002519 %K A002516 nonn,nice %O A002516 0,2 %A A002516 Colin Mallows (colinm(AT)research.avayalabs.com) Search completed in 0.001 seconds