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.
%I A350311 #23 Mar 11 2025 08:23:59 %S A350311 0,1,2,3,3,4,5,6,4,5,6,7,7,8,9,10,6,7,8,9,9,10,11,12,10,11,12,13,13, %T A350311 14,15,16,9,10,11,12,12,13,14,15,13,14,15,16,16,17,18,19,15,16,17,18, %U A350311 18,19,20,21,19,20,21,22,22,23,24,25,13,14,15,16,16,17 %N A350311 Replace 2^k in the binary expansion of n with A000930(k+2), Narayana's cows sequence. %C A350311 A048715(n) = m, if and only if a(n) = m and for all k > n a(k) > m. %H A350311 Rémy Sigrist, <a href="/A350311/b350311.txt">Table of n, a(n) for n = 0..8191</a> %p A350311 b:= (n, i, j, k)->`if`(n=0, 0, k*irem(n, 2, 'q')+b(q, j, k, i+k)): %p A350311 a:= n-> b(n, 1$3): %p A350311 seq(a(n), n=0..100); # _Alois P. Heinz_, Jan 26 2022 %o A350311 (Python) %o A350311 def Interpretation(n): %o A350311 f0, f1, f2, r = 1, 1, 1, 0 %o A350311 while n > 0: %o A350311 if n%2 == 1: %o A350311 r = r+f0 %o A350311 n, f0, f1, f2 = n//2, f0+f2, f0, f1 %o A350311 return r %o A350311 n = 0 %o A350311 while n <= 69: %o A350311 print(Interpretation(n), end = ", ") %o A350311 n += 1 %o A350311 (PARI) my(p=Mod('x,'x^3-'x^2-1)); a(n) = vecsum(Vec(lift(subst(Pol(binary(n))*'x^2,'x,p)))); \\ _Kevin Ryde_, Dec 26 2021 %Y A350311 Cf. A000930, A048715, A350215, A350312. %Y A350311 Cf. A022290 (analog for Fibonacci numbers). %K A350311 nonn,base %O A350311 0,3 %A A350311 _A.H.M. Smeets_, Dec 24 2021