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!)
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
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
Sequence in context: A235703 A366664 A097747 * A115777 A340033 A316847
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)