Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #18 Nov 05 2022 12:51:26
%S 0,1,4,3,4,13,12,13,10,9,10,13,12,13,40,39,40,37,36,37,40,39,40,31,30,
%T 31,28,27,28,31,30,31,40,39,40,37,36,37,40,39,40,121,120,121,118,117,
%U 118,121,120,121,112,111,112,109,108,109,112,111,112,121,120,121,118
%N a(n)=p+q, where n=p-q and p, q, p+q are in A005836 (integers written without 2 in base 3).
%H Reinhard Zumkeller, <a href="/A060374/b060374.txt">Table of n, a(n) for n = 0..10000</a>
%H Zoran Sunic, <a href="https://arxiv.org/abs/math/0612080">Tree morphisms, transducers and integer sequences</a>, arXiv:math/0612080 [math.CO], 2006.
%o (Haskell)
%o a060374 n = f $ dropWhile (< n) a005836_list where
%o f (p:ps) | a039966 (p-n) == 1 && a039966 (2*p-n) == 1 = 2*p - n
%o | otherwise = f ps
%o -- _Reinhard Zumkeller_, Sep 29 2011
%Y Cf. A005836, A039966, A060372, A060373.
%K nonn,easy,nice
%O 0,3
%A Claude Lenormand (claude.lenormand(AT)free.fr), Apr 02 2001
%E Definition clarified by _Zoran Sunic_, Feb 16 2006