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.

A228132 First differences of A014311.

This page as a plain text file.
%I A228132 #23 Apr 07 2025 10:08:24
%S A228132 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 A228132 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 A228132 1,2,4,8,17,1,2,4,8,16,33,1,2,4,8,16,32
%N A228132 First differences of A014311.
%C A228132 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 A228132 The record (maximum) among the first 1000 terms is 65539. - _Harvey P. Dale_, May 29 2018
%H A228132 Harvey P. Dale, <a href="/A228132/b228132.txt">Table of n, a(n) for n = 1..1000</a>
%t A228132 Differences[Select[Range[500],DigitCount[#,2,1]==3&]] (* _Harvey P. Dale_, May 29 2018 *)
%o A228132 (JavaScript)
%o A228132 oo=0;
%o A228132 for (i=1;i<500;i++) {
%o A228132 s=i.toString(2);
%o A228132 o=0;
%o A228132 for (j=0;j<s.length;j++) if (s.charAt(j)==1) o++;
%o A228132 if (o==3) {document.write(i-oo+", ");oo=i;}
%o A228132 }
%o A228132 (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
%o A228132 (Python)
%o A228132 from math import isqrt, comb
%o A228132 from sympy import integer_nthroot
%o A228132 def A228132(n): return (1<<(r:=n-comb((m:=integer_nthroot(6*n+6,3)[0])+(t:=(n>=comb(m+2,3)))+1,3))-comb((k:=isqrt(b:=r+1<<1))+(b>k*(k+1)),2))+(1<<(a:=isqrt(s:=n+1-comb(m-(t^1)+2,3)<<1))+((s<<2)>(a<<2)*(a+1)+1))+(1<<m+t+1)-(1<<(r:=n-1-comb((m:=integer_nthroot(6*n,3)[0])+(t:=(n>comb(m+2,3)))+1,3))-comb((k:=isqrt(b:=r+1<<1))+(b>k*(k+1)),2))-(1<<(a:=isqrt(s:=n-comb(m-(t^1)+2,3)<<1))+((s<<2)>(a<<2)*(a+1)+1))-(1<<m+t+1) # _Chai Wah Wu_, Apr 07 2025
%Y A228132 Cf. A062709 (2^n+3), A014311 (numbers with exactly 3 ones in binary expansion).
%Y A228132 Cf. A145057.
%K A228132 nonn,base
%O A228132 1,1
%A A228132 _Jon Perry_, Nov 02 2013