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!)
A285717 a(n) = A007814(n) + A159918(n) = A007814(n) + A000120(n^2). 4
1, 2, 2, 3, 3, 3, 3, 4, 3, 4, 5, 4, 4, 4, 4, 5, 3, 4, 5, 5, 6, 6, 3, 5, 5, 5, 6, 5, 5, 5, 5, 6, 3, 4, 5, 5, 6, 6, 7, 6, 5, 7, 7, 7, 8, 4, 4, 6, 5, 6, 5, 6, 8, 7, 7, 6, 6, 6, 7, 6, 6, 6, 6, 7, 3, 4, 5, 5, 6, 6, 7, 6, 6, 7, 9, 7, 7, 8, 5, 7, 6, 6, 8, 8, 7, 8, 7, 8, 9, 9, 5, 5, 6, 5, 5, 7, 5, 6, 6, 7, 9, 6, 7, 7, 6, 9, 8, 8, 8, 8, 4, 7, 7, 7, 8, 7, 9, 8, 8, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

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

Index entries for sequences related to binary expansion of n

FORMULA

a(n) = A007814(n) + A159918(n) = A007814(n) + A000120(n^2).

a(n) = A007814(n*A201555(n)).

MATHEMATICA

Table[IntegerExponent[n, 2] + DigitCount[n^2, 2, 1], {n, 120}] (* Indranil Ghosh, Apr 27 2017 *)

PROG

(Scheme)

(define (A285717 n) (+ (A007814 n) (A159918 n)))

(define (A285717 n) (A007814 (* n (A201555 n))))

(PARI) a(n) = valuation(n, 2) + hammingweight(n^2); \\ Indranil Ghosh, Apr 27 2017

(Python)

import math

def a(n): return int(math.log(n - (n & n - 1), 2)) + bin(n**2)[2:].count("1") # Indranil Ghosh, Apr 27 2017

CROSSREFS

Cf. A000120, A007814, A159918, A201555, A285388, A285406.

Sequence in context: A272605 A235703 A097747 * A115777 A340033 A316847

Adjacent sequences:  A285714 A285715 A285716 * A285718 A285719 A285720

KEYWORD

nonn,base

AUTHOR

Antti Karttunen, Apr 27 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 August 5 17:20 EDT 2021. Contains 346488 sequences. (Running on oeis4.)