cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A065760 Concatenation of increasing number of alternating digits in base 2, starting with 1.

This page as a plain text file.
%I A065760 #25 Mar 08 2024 16:39:49
%S A065760 1,4,39,624,19999,1279936,163831935,41940975360,21473779384831,
%T A065760 21989150090066944,45033779384457103359,184458360358736295358464,
%U A065760 1511082888058767731576545279,24757582037954850514150117851136,811256448219704541647671061746057215
%N A065760 Concatenation of increasing number of alternating digits in base 2, starting with 1.
%H A065760 Harry J. Smith, <a href="/A065760/b065760.txt">Table of n, a(n) for n = 1..50</a>
%F A065760 a(n) = a(n-1) * 2^n if n is even, (a(n-1) + 1) * 2^n - 1 if n is odd. - _Franklin T. Adams-Watters_, Sep 18 2012
%e A065760 a(5) = 19999 is formed by appending 1 five times (11111) to a(4) in base 2: 100111000011111.
%p A065760 a:= proc(n) option remember; `if`(n=1, 1,
%p A065760       (t-> (a(n-1)+t)*2^n-t)(irem(n,2)))
%p A065760     end:
%p A065760 seq(a(n), n=1..17);  # _Alois P. Heinz_, Mar 08 2024
%t A065760 With[{nn=20}, Table[FromDigits[Flatten[Take[Table[Table[If[EvenQ[n],0,1], {n}], {n,nn}], j]], 2], {j, nn}]] (* _Harvey P. Dale_, Sep 09 2012 *)
%o A065760 (PARI) baseI(x, b)= { local(d, e=0, f=1); while (x>0, d=x-10*(x\10); x\=10; e+=d*f; f*=b); return(e) } { c=1; for (n=1, 50, if (n==1, a=1; b=1, c=c*10 + 1; if (n%2, d=c, d=0); b=b*10^n + d; a=baseI(b, 2)); write("b065760.txt", n, " ", a) ) } \\ _Harry J. Smith_, Oct 30 2009
%Y A065760 Decimal version of A065447.
%Y A065760 Cf. A065761.
%K A065760 base,easy,nonn
%O A065760 1,2
%A A065760 _Lior Manor_, Nov 18 2001