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.

A068052 Start from 1, shift one left and sum mod 2 (bitwise-XOR) to get 3 (11 in binary), then shift two steps left and XOR to get 15 (1111 in binary), then three steps and XOR to get 119 (1110111 in binary), then four steps and so on.

This page as a plain text file.
%I A068052 #25 Mar 07 2024 16:45:45
%S A068052 1,3,15,119,1799,59367,3743271,481693095,123123509927,62989418816679,
%T A068052 64491023022979239,132015402419352060071,540829047855347718631591,
%U A068052 4430403202865824763042320551,72583450474242118015031400337575,2378466805556971511916001231449723047
%N A068052 Start from 1, shift one left and sum mod 2 (bitwise-XOR) to get 3 (11 in binary), then shift two steps left and XOR to get 15 (1111 in binary), then three steps and XOR to get 119 (1110111 in binary), then four steps and so on.
%C A068052 a(n) = each row of A053632 reduced mod 2 and interpreted as a binary number.
%H A068052 Antti Karttunen, <a href="/A068052/b068052.txt">Table of n, a(n) for n = 0..64</a>
%F A068052 a(0) = 1; for n > 0, a(n) = a(n-1) XOR (2^n)*a(n-1), where XOR is bitwise-XOR (A003987).
%F A068052 a(n) = A248663(A285101(n)) = A048675(A285102(n)).
%F A068052 A000120(a(n)) = A285103(n). [Number of ones in binary representation.]
%F A068052 A080791(a(n)) = A285105(n). [Number of nonleading zeros.]
%p A068052 with(gfun,seriestolist); [seq(foo(map(`mod`,seriestolist(series(mul(1+(z^i),i=1..n),z,binomial(n+1,2)+1)),2)), n=0..20)];
%p A068052 foo := proc(a) local i; add(a[i]*2^(i-1),i=1..nops(a)); end;
%p A068052 # second Maple program:
%p A068052 a:= proc(n) option remember; `if`(n=0, 1,
%p A068052       (t-> Bits[Xor](2^n*t, t))(a(n-1)))
%p A068052     end:
%p A068052 seq(a(n), n=0..16);  # _Alois P. Heinz_, Mar 07 2024
%t A068052 FoldList[BitXor[#, #*#2]&, 1, 2^Range[20]] (* _Paolo Xausa_, Mar 07 2024 *)
%o A068052 (Scheme, with memoization-macro definec)
%o A068052 (definec (A068052 n) (if (zero? n) 1 (A003987bi (A068052 (- n 1)) (* (A000079 n) (A068052 (- n 1)))))) ;; A003987bi implements bitwise-XOR (A003987).
%o A068052 (PARI) a(n) = if(n<1, 1, bitxor(a(n - 1), 2^n*a(n - 1))); \\ _Indranil Ghosh_, Apr 15 2017, after formula by _Antti Karttunen_
%Y A068052 Same sequence shown in binary: A068053.
%Y A068052 Cf. A000120, A003987, A028362 (using + instead of XOR), A048675, A053632, A080791, A248663, A285101, A285102, A285103, A285105.
%K A068052 nonn,base
%O A068052 0,2
%A A068052 _Antti Karttunen_, Feb 13 2002
%E A068052 Formulas added by _Antti Karttunen_, Apr 15 2017