A379018 a(n) is the least prime p such that p^2 < n and n - p^2 is not squarefree, or -1 if there is no such p.
-1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, 2, 2, -1, -1, 2, 3, 3, -1, 2, 3, 2, -1, 2, 3, -1, 3, 2, 2, -1, 2, 2, 3, 3, -1, 2, 3, -1, -1, 2, 3, -1, 5, 2, 3, -1, -1, 2, 2, 5, -1, 2, 2, 2, -1, 2, 3, 2, 3, 2, 3, -1, 3, 2, 3, -1, 2, 2, 3, 5, -1, 2, 3, 5, 5, 2, 3, -1, 2, 2, 3, -1, -1, 2, 2, -1, -1, 2, 3
Offset: 1
Keywords
Examples
a(17) = 3 because 17 - 3^2 = 8 is not squarefree, while 17 - 2^2 = 13 is squarefree.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= proc(n) local p; p:= 2; while p^2 <= n do if not numtheory:-issqrfree(n-p^2) then return p fi; p:= nextprime(p); od; -1 end proc: map(f, [$1..200]);
Comments