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.

A103341 Numbers k such that floor(k*sqrt(2)) is a power of 2.

This page as a plain text file.
%I A103341 #41 Aug 31 2024 22:02:25
%S A103341 1,2,3,6,12,23,91,2897,5793,23171,46341,92682,185364,370728,1482911,
%T A103341 2965821,5931642,23726567,47453133,94906266,379625063,759250125,
%U A103341 1518500250,3037000500,6074001000,12148002000,24296004000,48592008000
%N A103341 Numbers k such that floor(k*sqrt(2)) is a power of 2.
%C A103341 Sequence is infinite.
%C A103341 If floor(sqrt(2)*2^k) + 1 < sqrt(2)*2^k + sqrt(2)/2, then floor(sqrt(2)*2^k) + 1 is in this sequence. - _Jinyuan Wang_, Nov 04 2018
%D A103341 Jean-Marie De Koninck and Armel Mercier, 1001 problèmes en théorie classique des nombres, ellipses, 2004, pp. 117, 374-375.
%H A103341 Robert Israel, <a href="/A103341/b103341.txt">Table of n, a(n) for n = 1..1000</a>
%p A103341 N:= 100: # to get a(1)..a(N)
%p A103341 count:= 0:
%p A103341 for k from 0 while count < N do
%p A103341   a:= ceil(2^(k-1)*sqrt(2));
%p A103341   b:= floor((2^(k-1)+1/2)*sqrt(2));
%p A103341   if a=b then
%p A103341      count:= count+1;
%p A103341      A[count]:= a;
%p A103341   fi
%p A103341 od:
%p A103341 seq(A[n],n=1..N); # _Robert Israel_, Jul 19 2016
%t A103341 f[k_] := Reduce[n > 0 && (2^k)^2<= 2*n^2 <  (2^k + 1)^2, n, Integers]; n /. ToRules /@ Select[Table[f[k], {k, 0, 40}], # =!= False & ] (* _Jean-François Alcover_, Sep 13 2011 *)
%o A103341 (PARI) for(k=0,50,n=ceil(2^k/sqrt(2));if(floor(n*sqrt(2))==2^k,print1(n,","))) \\ _Robert Gerbicz_, Jun 09 2007
%o A103341 (PARI) isok(n) = my(b=sqrtint(2*n^2)); (b==1) || (b==2) || (isprimepower(b, &p) && (p==2)); \\ _Michel Marcus_, Mar 12 2019
%o A103341 (Magma) [n: n in [1..2*10^7] | 2^Ilog(2, s) eq s where s is Floor(n*Sqrt(2))]; // _Vincenzo Librandi_, Nov 06 2018
%Y A103341 Cf. A001951 (floor(n*sqrt(2))).
%K A103341 nonn
%O A103341 1,2
%A A103341 _Benoit Cloitre_, May 13 2007
%E A103341 More terms from _Robert Gerbicz_, Jun 09 2007