login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A295882 Balanced ternary representation of the deficiency of n, A033879(n). 8
1, 1, 5, 1, 4, 0, 15, 1, 17, 5, 10, 8, 12, 4, 15, 1, 52, 6, 45, 7, 10, 11, 49, 24, 46, 10, 53, 0, 28, 24, 30, 1, 45, 53, 49, 65, 36, 52, 49, 20, 40, 24, 159, 4, 12, 50, 154, 56, 161, 16, 30, 15, 142, 24, 41, 19, 43, 29, 139, 204, 150, 28, 49, 1, 154, 24, 147, 10, 159, 8, 106, 192, 99, 43, 29, 12, 139, 24, 87, 55 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..16384

FORMULA

If A033879(n) >= 0, then a(n) =  A117967(A033879(n)), otherwise a(n) = A117968(-A033879(n)).

For all n >= 1, A117966(a(n)) =  A033879(n).

PROG

(PARI)

A117967(n) = if(n<=1, n, if(!(n%3), 3*A117967(n/3), if(1==(n%3), 1+3*A117967((n-1)/3), 2+3*A117967((n+1)/3))));

A117968(n) = if(1==n, 2, if(!(n%3), 3*A117968(n/3), if(1==(n%3), 2+3*A117968((n-1)/3), 1+3*A117968((n+1)/3))));

A295882(n) = { my(x = (2*n)-sigma(n)); if(x >= 0, A117967(x), A117968(-x)); };

(Scheme) (define (A295882 n) (let ((x (A033879 n))) (if (>= x 0) (A117967 x) (A117968 (- x)))))

CROSSREFS

Cf. A033879, A033880, A117966, A117967, A117968, A286449, A295881, A296071, A296072, A296073.

Cf. A000396 (gives the positions of zeros).

Sequence in context: A275842 A147640 A096615 * A127551 A256547 A023138

Adjacent sequences:  A295879 A295880 A295881 * A295883 A295884 A295885

KEYWORD

nonn

AUTHOR

Antti Karttunen, Dec 04 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 02:29 EDT 2020. Contains 337266 sequences. (Running on oeis4.)