login
First differences of A014311.
1

%I #19 May 29 2018 21:02:11

%S 4,2,1,5,2,1,3,1,2,7,2,1,3,1,2,5,1,2,4,11,2,1,3,1,2,5,1,2,4,9,1,2,4,8,

%T 19,2,1,3,1,2,5,1,2,4,9,1,2,4,8,17,1,2,4,8,16,35,2,1,3,1,2,5,1,2,4,9,

%U 1,2,4,8,17,1,2,4,8,16,33,1,2,4,8,16,32

%N First differences of A014311.

%C The records are: 4, 5, 7, 11, 19, 35, 67, ... and they occur at these indices of A014311: 11, 19, 35, 67, ... (for both, see A062709). - _Michel Marcus_, Jun 11 2015

%C The record (maximum) among the first 1000 terms is 65539. - _Harvey P. Dale_, May 29 2018

%H Harvey P. Dale, <a href="/A228132/b228132.txt">Table of n, a(n) for n = 1..1000</a>

%t Differences[Select[Range[500],DigitCount[#,2,1]==3&]] (* _Harvey P. Dale_, May 29 2018 *)

%o (JavaScript)

%o oo=0;

%o for (i=1;i<500;i++) {

%o s=i.toString(2);

%o o=0;

%o for (j=0;j<s.length;j++) if (s.charAt(j)==1) o++;

%o if (o==3) {document.write(i-oo+", ");oo=i;}

%o }

%o (PARI) lista(nn) = {my(last = 0); for (n=1, nn, if (hammingweight(n)==3, if (last, print1(n-last,", ")); last = n;););} \\ _Michel Marcus_, Jun 10 2015

%Y Cf. A062709 (2^n+3), A014311 (numbers with exactly 3 ones in binary expansion).

%Y Cf. A145057.

%K nonn,base

%O 1,1

%A _Jon Perry_, Nov 02 2013