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!)
A343604 a(n) is the least number > n with the same sum of balanced ternary digits as n. 2

%I #10 Apr 25 2021 15:13:45

%S 2,3,6,7,10,15,8,9,16,11,12,19,22,31,42,17,18,23,20,21,24,25,28,43,26,

%T 27,32,29,30,33,34,37,46,35,36,49,38,39,58,67,94,123,44,45,50,47,48,

%U 51,52,55,68,53,54,59,56,57,60,61,64,69,62,63,70,65,66,73

%N a(n) is the least number > n with the same sum of balanced ternary digits as n.

%C This sequence can be extended to negative indexes by setting a(-n) = -A343605(n) for any n > 0.

%H Rémy Sigrist, <a href="/A343604/b343604.txt">Table of n, a(n) for n = 0..10000</a>

%F a(9*n) = 9*n + 2.

%F a(A174658(n)) = A174658(n+1).

%e The first terms, in base 10 and in balanced ternary (where T denotes the digit -1), alongside A065363(n), are:

%e n a(n) bter(n) bter(a(n)) A065363(n)

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

%e 0 2 0 1T 0

%e 1 3 1 10 1

%e 2 6 1T 1T0 0

%e 3 7 10 1T1 1

%e 4 10 11 101 2

%e 5 15 1TT 1TT0 -1

%e 6 8 1T0 10T 0

%e 7 9 1T1 100 1

%e 8 16 10T 1TT1 0

%e 9 11 100 11T 1

%e 10 12 101 110 2

%e 11 19 11T 1T01 1

%e 12 22 110 1T11 2

%o (PARI) A065363(n) = { my (v=0, d); while (n, v+=d=centerlift(Mod(n,3)); n=(n-d)\3); v }

%o a(n) = my (s=A065363(n)); for (k=n+1, oo, if (s==A065363(k), return (k)))

%Y Cf. A057168, A065363, A174658, A228915, A319021, A343605.

%K nonn,base

%O 0,1

%A _Rémy Sigrist_, Apr 22 2021

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 May 10 11:28 EDT 2024. Contains 372387 sequences. (Running on oeis4.)