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.

A334888 a(n) = Sum_{k >= 0} f(d_k) * 3^k where Sum_{k >= 0} d_k * 8^k is the base 8 representation of n and f(k) = 0, 1, 2, 2, 2, 1, 0, 0 for k = 0..7, respectively.

This page as a plain text file.
%I A334888 #15 Apr 29 2021 12:32:47
%S A334888 0,1,2,2,2,1,0,0,3,4,5,5,5,4,3,3,6,7,8,8,8,7,6,6,6,7,8,8,8,7,6,6,6,7,
%T A334888 8,8,8,7,6,6,3,4,5,5,5,4,3,3,0,1,2,2,2,1,0,0,0,1,2,2,2,1,0,0,9,10,11,
%U A334888 11,11,10,9,9,12,13,14,14,14,13,12,12,15,16
%N A334888 a(n) = Sum_{k >= 0} f(d_k) * 3^k where Sum_{k >= 0} d_k * 8^k is the base 8 representation of n and f(k) = 0, 1, 2, 2, 2, 1, 0, 0 for k = 0..7, respectively.
%C A334888 The lattice points with coordinates (a(n), A334889(n)) for n >= 0 form a Sierpinski carpet.
%H A334888 Rémy Sigrist, <a href="/A334888/b334888.txt">Table of n, a(n) for n = 0..4095</a> (n = 0..8^4-1)
%H A334888 Rémy Sigrist, <a href="/A334888/a334888.png">Colored scatterplot of (a(n), A334889(n)) for n = 0..8^6-1</a> (where the hue is function of n)
%H A334888 Wikipedia, <a href="https://en.wikipedia.org/wiki/Sierpinski_carpet">Sierpinski carpet</a>
%F A334888 A153490(1 + a(n), 1 + A334889(n)) = 1.
%e A334888 For n = 42:
%e A334888 - 42 = 5*8^1 + 2*8^0,
%e A334888 - so a(42) = f(5)*3^1 + f(2)*3^0 = 1*3^1 + 2*3^0 = 5.
%o A334888 (PARI) a(n) = { my (f=[0, 1, 2, 2, 2, 1, 0, 0], d=Vecrev(digits(n, #f))); sum(k=0, #d-1, f[1+d[1+k]] * 3^k) }
%Y A334888 Cf. A153490, A334889.
%K A334888 nonn,base
%O A334888 0,3
%A A334888 _Rémy Sigrist_, May 14 2020