A067874 Positive integers x satisfying x^2 - D*y^2 = 1 for a unique integer D.
2, 4, 6, 12, 14, 16, 18, 20, 22, 30, 32, 34, 36, 38, 40, 42, 52, 54, 56, 58, 60, 66, 68, 70, 72, 78, 84, 86, 88, 90, 92, 94, 96, 102, 104, 106, 108, 110, 112, 114, 128, 130, 132, 138, 140, 142, 144, 150, 156, 158, 160, 162, 164, 166, 178, 180, 182, 184, 186, 192, 194, 196, 198
Offset: 1
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
Magma
[n: n in [1..110] | IsSquarefree(n-1) and IsSquarefree(n+1)]; // Juri-Stepan Gerasimov, Jan 17 2017
-
Maple
select(t -> numtheory:-issqrfree(t^2-1), [seq(n,n=2..1000,2)]); # Robert Israel, Apr 12 2016
-
Mathematica
Select[Range[200], SquareFreeQ[#^2-1]&] (* Vladimir Joseph Stephan Orlovsky, Oct 26 2009 *)
-
Python
from itertools import count, islice from sympy import factorint def A067874_gen(startvalue=2): # generator of terms >= startvalue return filter(lambda k:max(factorint(k-1).values(),default=1)==1 and max(factorint(k+1).values())==1, count(max(startvalue+(startvalue&1),2),2)) A067874_list = list(islice(A067874_gen(),20)) # Chai Wah Wu, Apr 24 2024
Formula
a(n) = 2*A272799(n). - Juri-Stepan Gerasimov, Jan 17 2017
Extensions
Corrected and extended by Max Alekseyev, Apr 26 2009
Further edited by Max Alekseyev, Apr 28 2009
Comments