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.

A301848 Number of states generated by morphism during inflation stage of paper-folding sequence.

This page as a plain text file.
%I A301848 #19 Jul 30 2023 08:47:59
%S A301848 1,3,1,4,1,3,2,4,1,3,1,4,2,3,2,4,1,3,1,4,1,3,2,4,2,3,1,4,2,3,2,4,1,3,
%T A301848 1,4,1,3,2,4,1,3,1,4,2,3,2,4,2,3,1,4,1,3,2,4,2,3,1,4,2,3,2,4,1,3,1,4,
%U A301848 1,3,2,4,1,3,1,4,2,3,2,4,1,3,1,4,1,3,2,4,2,3,1,4,2,3,2,4,2,3,1,4,1
%N A301848 Number of states generated by morphism during inflation stage of paper-folding sequence.
%C A301848 a(0), a(1), ... is the fixed point of inflation morphism 1 -> 1 3, 2 -> 2 3, 3 -> 1 4, 4 -> 2 4, starting from state 1;
%C A301848 b(0), b(1), ... is the image of a(n) under encoding morphism 1 -> 0, 2 -> 1, 3 -> 0, 4 -> 1.
%C A301848 The number-wall over the rationals (signed Hankel determinants) is apparently free from zeros.
%D A301848 Jean-Paul Allouche and Jeffrey O. Shallit, Automatic sequences, Cambridge, 2003, sect. 5.1.6.
%H A301848 W. F. Lunnon, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL4/LUNNON/numbwall10.html">The number-wall algorithm: an LFSR cookbook</a>, Journal of Integer Sequences 4 (2001), no. 1, 01.1.1.
%F A301848 a(n) = b(2n) - 2 b(2n-1) + 3, where b(n) denotes A038189(n).
%p A301848 A301848 := proc(n)
%p A301848     A038189(2*n)-2*A038189(2*n-1)+3 ;
%p A301848 end proc:
%p A301848 seq(A301848(n),n=0..100) ; # _R. J. Mathar_, Mar 30 2018
%t A301848 b[n_] := If[n == 0, 0, BitGet[n, IntegerExponent[n, 2] + 1]];
%t A301848 a[n_] := b[2n] - 2 b[2n-1] + 3;
%t A301848 Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Jul 30 2023 *)
%o A301848 (Magma)
%o A301848 function b (n)
%o A301848   if n eq 0 then return 0; // alternatively,  return 1;
%o A301848   else while IsEven(n) do n := n div 2; end while; end if;
%o A301848   return n div 2 mod 2; end function;
%o A301848 function a (n)
%o A301848   return b(n+n) - 2*b(n+n-1) + 3; end function;
%o A301848   nlo := 0; nhi := 32;
%o A301848   [a(n) : n in [nlo..nhi] ];
%Y A301848 Cf. A038189, A301849, A301850.
%K A301848 nonn
%O A301848 0,2
%A A301848 _Fred Lunnon_, Mar 27 2018