cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A285717 #12 Apr 30 2017 07:55:57
%S A285717 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,
%T A285717 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,
%U A285717 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
%N A285717 a(n) = A007814(n) + A159918(n) = A007814(n) + A000120(n^2).
%H A285717 Antti Karttunen, <a href="/A285717/b285717.txt">Table of n, a(n) for n = 1..8192</a>
%H A285717 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A285717 a(n) = A007814(n) + A159918(n) = A007814(n) + A000120(n^2).
%F A285717 a(n) = A007814(n*A201555(n)).
%t A285717 Table[IntegerExponent[n, 2] + DigitCount[n^2, 2, 1], {n, 120}] (* _Indranil Ghosh_, Apr 27 2017 *)
%o A285717 (Scheme)
%o A285717 (define (A285717 n) (+ (A007814 n) (A159918 n)))
%o A285717 (define (A285717 n) (A007814 (* n (A201555 n))))
%o A285717 (PARI) a(n) = valuation(n, 2) + hammingweight(n^2); \\ _Indranil Ghosh_, Apr 27 2017
%o A285717 (Python)
%o A285717 import math
%o A285717 def a(n): return int(math.log(n - (n & n - 1), 2)) + bin(n**2)[2:].count("1") # _Indranil Ghosh_, Apr 27 2017
%Y A285717 Cf. A000120, A007814, A159918, A201555, A285388, A285406.
%K A285717 nonn,base
%O A285717 1,2
%A A285717 _Antti Karttunen_, Apr 27 2017