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.

A348175 Irregular table T(n,k) read by rows: T(n,k) = T(n-1,k/2) when k is even and 3*T(n-1,(k-1)/2) + 2^(n-1) when k is odd. T(0,0) = 0 and 0 <= k <= 2^n-1.

This page as a plain text file.
%I A348175 #31 Oct 22 2021 23:24:46
%S A348175 0,0,1,0,2,1,5,0,4,2,10,1,7,5,19,0,8,4,20,2,14,10,38,1,11,7,29,5,23,
%T A348175 19,65,0,16,8,40,4,28,20,76,2,22,14,58,10,46,38,130,1,19,11,49,7,37,
%U A348175 29,103,5,31,23,85,19,73,65,211
%N A348175 Irregular table T(n,k) read by rows: T(n,k) = T(n-1,k/2) when k is even and 3*T(n-1,(k-1)/2) + 2^(n-1) when k is odd. T(0,0) = 0 and 0 <= k <= 2^n-1.
%F A348175 T(n,k) = T(n-1,k/2) for k being even.
%F A348175 T(n,k) = 3*T(n-1,(k-1)/2) + 2^(n-1) for k being odd.
%F A348175 T(n,k) = 2*T(n-1,k) for 0 <= k <= 2^(n-1) - 1.
%F A348175 T(n,k) = Sum_{i=0..r} 2^(n-1-e[i]) * 3^i where binary expansion k = 2^e[0] + 2^e[1] + ... + 2^e[r] with ascending e[0] < e[1] < ... < e[r] (A133457). - _Kevin Ryde_, Oct 22 2021
%e A348175 n\k 0  1  2  3  4  5  6  7
%e A348175 0   0
%e A348175 1   0  1
%e A348175 2   0  2  1  5
%e A348175 3   0  4  2 10  1  7  5 19
%t A348175 T[0, 0] = 0; T[n_, k_] := T[n, k] = If[EvenQ[k], T[n - 1, k/2], 3*T[n - 1, (k - 1)/2] + 2^(n - 1)]; Table[T[n, k], {n, 0, 5}, {k, 0, 2^n - 1}] // Flatten (* _Amiram Eldar_, Oct 11 2021 *)
%o A348175 (PARI) T(n, k) = if ((n==0) && (k==0), 0, if (k%2, 3*T(n-1,(k-1)/2) + 2^(n-1), T(n-1,k/2)));
%o A348175 tabf(nn) = for (n=0, nn, for (k=0, 2^n-1, print1(T(n,k), ", ")); print); \\ _Michel Marcus_, Oct 18 2021
%o A348175 (PARI) T(n,k) = my(ret=0); for(i=0,n-1, if(bittest(k,n-1-i), ret=3*ret+1<<i)); ret; \\ _Kevin Ryde_, Oct 22 2021
%Y A348175 Cf. A001047 (right diagonal), A002697 (row sums), A119733.
%Y A348175 Cf. A133457 (binary exponents).
%K A348175 nonn,tabf
%O A348175 0,5
%A A348175 _Ryan Brooks_, Oct 04 2021