OFFSET
1,2
COMMENTS
Erdős stated that it "seems likely" that this sequence is infinite.
LINKS
Husnain Raza, Table of n, a(n) for n = 1..100000
Thomas Bloom, Problem 676, Erdős Problems.
P. Erdős, Some unconventional problems in number theory, Acta Math. Acad. Sci. Hungar. (1979), 77.
Erdős problems database contributors, Issue #135 linking Erdős problems to the OEIS.
MAPLE
N:= 500: # for terms <= N
S:= {$1..N}:
p:= 1:
do
p:= nextprime(p);
if p^2 > N then break fi;
S:= S minus {seq(seq(a*p^2+b, b=0..p-1), a=1.. N/p^2)}
od:
sort(convert(S, list)); # Robert Israel, Oct 28 2025
PROG
(Python)
import numpy as np
from sympy import primerange
from math import isqrt
def A390181_list(n_max):
sieve = np.zeros((n_max, ), dtype=bool)
for p in primerange(2, isqrt(n_max)+1):
for a in range(1, n_max//(p*p)+1):
sieve[a*p*p-1: a*p*p+p-1] = True
return [i+1 for i in range(n_max) if not sieve[i]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Husnain Raza, Oct 28 2025
STATUS
approved
