OFFSET
1,1
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..214
Amiram Eldar, List of triples.
Mauro Fiorentini, Carmichael gemelli (numeri di) (in Italian).
Romeo Meštrović, Generalizations of Carmichael numbers I, arXiv:1305.1867 [math.NT], 2013.
MATHEMATICA
npwcQ[n_] := Length[(p = FactorInteger[n][[;; , 1]])] > 1 && AllTrue[p, Divisible[n - 1, # - 1] &]; (* A087442 *)
seq[indmax_] := Module[{carmichaels = Cases[Import["https://oeis.org/A002997/b002997.txt", "Table"], {_, _}][[;; , 2]], s1 = s2 = {}, c1, c2, i}, Do[c1 = carmichaels[[k]] + 2; c2 = carmichaels[[k + 1]] - 2; While[c1 < c2, If[npwcQ[c1], Break[]]; c1 += 2]; If[c1 == c2, AppendTo[s1, carmichaels[[k]]]; AppendTo[s2, carmichaels[[k + 1]]]], {k, 1, Min[indmax, Length[carmichaels] - 1]}]; i = Position[Rest[s1] - Most[s2], 0] // Flatten; s1[[i]]]; seq[200]
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Aug 17 2023
STATUS
approved