login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A374363 a(n) is the greatest term t <= n of A005836 such that n - t also belongs to A005836. 3

%I #9 Jul 09 2024 02:21:41

%S 0,1,1,3,4,4,3,4,4,9,10,10,12,13,13,12,13,13,9,10,10,12,13,13,12,13,

%T 13,27,28,28,30,31,31,30,31,31,36,37,37,39,40,40,39,40,40,36,37,37,39,

%U 40,40,39,40,40,27,28,28,30,31,31,30,31,31,36,37,37,39,40

%N a(n) is the greatest term t <= n of A005836 such that n - t also belongs to A005836.

%C To compute a(n): in the ternary expansion of n, 2's by 1's.

%H Rémy Sigrist, <a href="/A374363/b374363.txt">Table of n, a(n) for n = 0..6560</a>

%F a(n) = T(n, A120880(k)-1).

%F a(n) = n - A374362(n).

%F a(n) <= n with equality iff n belongs to A005836.

%F a(n) = A005836(1+A289831(n)).

%e The first terms, in decimal and in ternary, are:

%e n a(n) ter(n) ter(a(n))

%e -- ---- ------ ---------

%e 0 0 0 0

%e 1 1 1 1

%e 2 1 2 1

%e 3 3 10 10

%e 4 4 11 11

%e 5 4 12 11

%e 6 3 20 10

%e 7 4 21 11

%e 8 4 22 11

%e 9 9 100 100

%e 10 10 101 101

%e 11 10 102 101

%e 12 12 110 110

%e 13 13 111 111

%e 14 13 112 111

%e 15 12 120 110

%o (PARI) a(n) = fromdigits(apply(d -> [0, 1, 1][1+d], digits(n, 3)), 3)

%Y Cf. A005836, A120880, A289831, A374361, A374362.

%K nonn,base

%O 0,4

%A _Rémy Sigrist_, Jul 06 2024

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 27 12:23 EDT 2024. Contains 374647 sequences. (Running on oeis4.)