OFFSET
1,1
EXAMPLE
The decompositions of the first terms are
25: [[4, 3], [5, 0]]
65: [[7, 4], [8, 1]]
85: [[7, 6], [9, 2]]
125: [[10, 5], [11, 2]]
145: [[9, 8], [12, 1]]
169: [[12, 5], [13, 0]]
185: [[11, 8], [13, 4]]
205: [[13, 6], [14, 3]]
221: [[11, 10], [14, 5]]
225: [[12, 9], [15, 0]]
265: [[12, 11], [16, 3]]
289: [[15, 8], [17, 0]]
305: [[16, 7], [17, 4]]
325: [[15, 10], [17, 6], [18, 1]]
365: [[14, 13], [19, 2]]
377: [[16, 11], [19, 4]]
PROG
(PARI) A000161(n)=sum(k=sqrtint((n-1)\2)+1, sqrtint(n), issquare(n-k^2));
is(n)=if(n%2==1, A000161(n)>1, 0);
select(is, vector(1300, n, n))
(Python)
from itertools import count, islice
from math import prod
from sympy import factorint
def A306358_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue+1-(startvalue&1), 1), 2):
f = factorint(n)
if 1<int(not any(e&1 for e in f.values())) + (((m:=prod(1 if p==2 else (e+1 if p&3==1 else (e+1)&1) for p, e in f.items()))+((((~n & n-1).bit_length()&1)<<1)-1 if m&1 else 0))>>1):
yield n
CROSSREFS
KEYWORD
nonn
AUTHOR
Joerg Arndt, Feb 10 2019
STATUS
approved