login
A375203
Positions of records in A375202.
3
0, 3, 12, 43, 48, 142, 172, 192, 427, 568, 688, 768, 1708, 2272, 2752, 3072, 6832, 9088, 11008, 12288, 27328, 36352, 44032, 49152, 109312, 145408, 176128, 196608, 437248, 581632, 704512, 786432, 1748992, 2326528, 2818048, 3145728, 6995968, 9306112, 11272192
OFFSET
1,2
COMMENTS
Numbers k such that the A375202(k) > A375202(j) for all j < k.
FORMULA
A375202(a(n)) = A375204(n).
EXAMPLE
a(3) = 12 is a term because A375202(12) = 2 and A375202(j) <= 1 for j < 12.
MAPLE
f:= proc(n) local q, x, y, z;
if n/4^padic:-ordp(n, 4) mod 8 = 7 then return -1 fi;
for x from 0 while 3*x^2 <= n do
if [isolve(y^2 + z^2 = n - x^2)] <> [] then return x fi
od;
end proc:
R:= NULL:count:= 0: m:= -1;
for i from 0 while count < 39 do
v:= f(i);
if v > m then
R:= R, i; m:= v; count:=count+1
fi
od:
R;
PROG
(Python)
from itertools import count, islice
from math import isqrt
from sympy import factorint
def A375203_gen(): # generator of terms
c = -1
for n in count(0):
v = (~n & n-1).bit_length()
if v&1 or n>>v&7!=7:
a = next(x for x in range(isqrt(n//3)+1) if not any(e&1 and p&3==3 for p, e in factorint(n-x**2).items()))
if a>c:
yield n
c = a
A375203_list = list(islice(A375203_gen(), 20)) # Chai Wah Wu, Oct 16 2024
CROSSREFS
Sequence in context: A191112 A066987 A366617 * A290918 A012873 A282082
KEYWORD
nonn
AUTHOR
Robert Israel, Oct 15 2024
EXTENSIONS
a(35)-a(39) from Chai Wah Wu, Oct 16 2024
STATUS
approved