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!)
A246160 Inverse function to the injection A065621. 5
0, 1, 2, 0, 4, 0, 0, 3, 8, 0, 0, 7, 0, 5, 6, 0, 16, 0, 0, 15, 0, 13, 14, 0, 0, 9, 10, 0, 12, 0, 0, 11, 32, 0, 0, 31, 0, 29, 30, 0, 0, 25, 26, 0, 28, 0, 0, 27, 0, 17, 18, 0, 20, 0, 0, 19, 24, 0, 0, 23, 0, 21, 22, 0, 64, 0, 0, 63, 0, 61, 62, 0, 0, 57, 58, 0, 60, 0, 0, 59, 0, 49, 50, 0, 52 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Sequence has nonzero values a(n) = k at those points n for which A065621(k) = n and zeros at those positions n which are not present in A065621.

Equally, sequence is obtained when the negative terms of A065620 are replaced with zeros

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..8192

FORMULA

a(n) = A010060(n) * A065620(n).

a(n) = A246159(n) + A065620(n).

a(0) = 0, and for n >= 1, a(n) = A010060(n) *  (1 + A006068(A115384(n)-1)).

For all n, a(A065621(n)) = n.

PROG

(Scheme, two different implementations)

(define (A246160 n) (* (A010060 n) (A065620 n)))

(define (A246160 n) (if (zero? n) n (* (A010060 n) (1+ (A006068 (-1+ (A115384 n)))))))

(PARI)

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

a(n) = (hammingweight(n)%2)*a065620(n);

for(n=0, 100, print1(a(n), ", ")) \\ Indranil Ghosh, Jun 07 2017

(Python)

def a065620(n): return n if n<3 else 2*a065620(n/2) if n%2==0 else -2*a065620((n - 1)/2) + 1

def a(n): return (bin(n)[2:].count("1")%2)*a065620(n)

print [a(n) for n in range(101)] # Indranil Ghosh, Jun 07 2017

CROSSREFS

Cf. A246159, A006068, A010060, A115384, A065620, A065621.

Sequence in context: A048298 A123565 A258701 * A081120 A200038 A249093

Adjacent sequences:  A246157 A246158 A246159 * A246161 A246162 A246163

KEYWORD

nonn

AUTHOR

Antti Karttunen, Aug 18 2014

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 April 5 19:23 EDT 2020. Contains 333257 sequences. (Running on oeis4.)