[go: up one dir, main page]

login
A103341
Numbers k such that floor(k*sqrt(2)) is a power of 2.
2
1, 2, 3, 6, 12, 23, 91, 2897, 5793, 23171, 46341, 92682, 185364, 370728, 1482911, 2965821, 5931642, 23726567, 47453133, 94906266, 379625063, 759250125, 1518500250, 3037000500, 6074001000, 12148002000, 24296004000, 48592008000
OFFSET
1,2
COMMENTS
Sequence is infinite.
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
REFERENCES
Jean-Marie De Koninck and Armel Mercier, 1001 problèmes en théorie classique des nombres, ellipses, 2004, pp. 117, 374-375.
LINKS
MAPLE
N:= 100: # to get a(1)..a(N)
count:= 0:
for k from 0 while count < N do
a:= ceil(2^(k-1)*sqrt(2));
b:= floor((2^(k-1)+1/2)*sqrt(2));
if a=b then
count:= count+1;
A[count]:= a;
fi
od:
seq(A[n], n=1..N); # Robert Israel, Jul 19 2016
MATHEMATICA
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 *)
PROG
(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
(PARI) isok(n) = my(b=sqrtint(2*n^2)); (b==1) || (b==2) || (isprimepower(b, &p) && (p==2)); \\ Michel Marcus, Mar 12 2019
(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
CROSSREFS
Cf. A001951 (floor(n*sqrt(2))).
Sequence in context: A326021 A164363 A306809 * A023675 A029996 A294123
KEYWORD
nonn
AUTHOR
Benoit Cloitre, May 13 2007
EXTENSIONS
More terms from Robert Gerbicz, Jun 09 2007
STATUS
approved