OFFSET
1,1
COMMENTS
The three primes are of the form 4*k + 1.
LINKS
Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1000 terms from Colin Barker)
EXAMPLE
1105 is in the sequence because x^2 + y^2 = 1105 = 5*13*17 has solutions (x,y) = (4,33), (9,32), (12,31) and (23,24).
PROG
(PARI)
dop(d, nmax) = {
my(L=List(), v=vector(d, m, 1)~, f);
for(n=1, nmax,
f=factorint(n);
if(#f~==d && f[1, 1]>2 && f[, 2]==v && f[, 1]%4==v, listput(L, n))
);
Vec(L)
}
dop(3, 15000)
(Python)
from math import isqrt
from sympy import primerange, integer_nthroot
from oeis_sequences.OEISsequences import bisection
def A264498(n):
def g(x): return sum(1 for p in primerange(5, x+1) if p&3==1)
def h(x, y, i): return enumerate((p for p in primerange(x, y) if p&3==1), i)
def f(x): return int(n+x-sum(g(x//(k*m))-b for a, k in h(5, integer_nthroot(x, 3)[0]+1, 1) for b, m in h(k+1, isqrt(x//k)+1, a+1)))
return bisection(f, n, n) # Chai Wah Wu, Dec 20 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Colin Barker, Nov 15 2015
STATUS
approved
