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.

A081857 Jacobsthal sequence (A001045) as represented in base 4.

This page as a plain text file.
%I A081857 #13 Apr 18 2025 22:21:58
%S A081857 0,1,1,3,11,23,111,223,1111,2223,11111,22223,111111,222223,1111111,
%T A081857 2222223,11111111,22222223,111111111,222222223,1111111111,2222222223,
%U A081857 11111111111,22222222223,111111111111,222222222223,1111111111111
%N A081857 Jacobsthal sequence (A001045) as represented in base 4.
%H A081857 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Repunit.html">Repunit.</a>
%F A081857 For n > 0, a(2n) is represented as a string of n 1's and a(2n+1) as a string of (n-1) 2's followed by a 3.
%e A081857 a(8)= 1111 because A001045(8)= 85 (in base 10) = 64 + 16 + 4 + 1 = 1 * (4^3) + 1 * (4^2) + 1 * (4^1) + 1.
%o A081857 (Python)
%o A081857 from gmpy2 import digits
%o A081857 def A081857(n): return int(digits(((1<<n)|1)//3,4)) # _Chai Wah Wu_, Apr 18 2025
%Y A081857 Cf. A002450.
%K A081857 base,easy,nonn
%O A081857 0,4
%A A081857 _Matthew Vandermast_, Apr 11 2003