OFFSET
1,1
COMMENTS
This property for prime p-1 = cube only numbers does not hold since the sum of 2 cubes has factors and p-1 = q^3 => p = q^3+1 = sum of 2 cubes.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 2..301 from Vincenzo Librandi)
EXAMPLE
101 is included because 100 = 2^2*5^2 only square factors. 109 is not because while 108=2^2*3^3 has a square only factor it also has a cube factor.
MATHEMATICA
Prepend[Select[Table[Prime[n], {n, 70000}], Length[Union[Last/@FactorInteger[#-1]]]==1&&Union[Last/@FactorInteger[#-1]]=={2}&], 2] (* Vladimir Joseph Stephan Orlovsky, Apr 08 2011 *)
seq[lim_] := Select[Select[Range[Floor[Surd[lim-1, 2]]], SquareFreeQ]^2 + 1, PrimeQ]; seq[10^6] (* Amiram Eldar, Jan 18 2025 *)
PROG
(PARI) list(lim) = select(isprime, apply(x -> x^2 + 1, select(issquarefree, vector(sqrtnint(lim-1, 2), i, i)))); \\ Amiram Eldar, Jan 18 2025
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Dec 08 2003
EXTENSIONS
a(1) = 2 inserted by Amiram Eldar, Jan 18 2025
STATUS
approved
