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 A131294 #21 Feb 24 2025 08:32:33 %S A131294 0,1,1,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2, %T A131294 3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3, %U A131294 3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3 %N A131294 a(n)=ds_3(a(n-1))+ds_3(a(n-2)), a(0)=0, a(1)=1; where ds_3=digital sum base 3. %C A131294 The digital sum analog (in base 3) of the Fibonacci recurrence. %C A131294 When starting from index n=3, periodic with Pisano period A001175(2)=3. %C A131294 a(n) and Fib(n)=A000045(n) are congruent modulo 2 which implies that (a(n) mod 2) is equal to (Fib(n) mod 2)=A011655(n). Thus (a(n) mod 2) is periodic with the Pisano period A001175(2)=3 too. %C A131294 For general bases p>2, we have the inequality 2<=a(n)<=2p-3 (for n>2). Actually, a(n)<=3=A131319(3) for the base p=3. %H A131294 <a href="/index/Coi#Colombian">Index entries for Colombian or self numbers and related sequences</a> %H A131294 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 1). %F A131294 a(n) = a(n-1)+a(n-2)-2*(floor(a(n-1)/3)+floor(a(n-2)/3)). %F A131294 a(n) = floor(a(n-1)/3)+floor(a(n-2)/3)+(a(n-1)mod 3)+(a(n-2)mod 3). %F A131294 a(n) = A002264(a(n-1))+A002264(a(n-2))+A010872(a(n-1))+A010872(a(n-2)). %F A131294 a(n) = Fib(n)-2*sum{1<k<n, Fib(n-k+1)*floor(a(k)/3)}, where Fib(n)=A000045(n). %e A131294 a(5)=3, since a(3)=2, ds_3(2)=2, a(4)=3=10(base 3), %e A131294 ds_3(3)=1 and so a(5)=2+1. %t A131294 nxt[{a_,b_}]:={b,Total[IntegerDigits[a,3]]+Total[IntegerDigits[b,3]]}; Transpose[NestList[nxt,{0,1},100]][[1]] (* _Harvey P. Dale_, Aug 02 2016 *) %Y A131294 Cf. A000045, A010073, A010074, A010075, A010076, A010077, A131295, A131296, A131297, A131318, A131319, A131320. %K A131294 nonn,base,easy %O A131294 0,4 %A A131294 _Hieronymus Fischer_, Jun 27 2007 %E A131294 Incorrect comment removed by _Michel Marcus_, Apr 29 2018