OFFSET
1,1
COMMENTS
The complement of A178751 (within integers > 1). - M. F. Hasler, Jun 06 2016
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Emmanuel Amiot, Autosimilar Melodies, J. Math. Music 2 (2008), no. 3, 157-180. DOI: 10.1080/17459730802598146.
Emmanuel Amiot, Mélodies autosimilaires (Self-Replicating Melodies) (in French).
EXAMPLE
19 is in the sequence because -1 == 10^9 (mod 19).
MATHEMATICA
ord[x_, n_] := Module[{k = 1}, While[k <= EulerPhi[n]/2 && PowerMod[x, k, n] != n - 1, k++ ]; If[PowerMod[x, k, n] == n - 1, k, infinity]] iGeneralise[n_] := Module[{candidats = Range[n - 2]}, candidats = Select[candidats, (GCD[n, # ] == 1) &]; Select[candidats, (ord[ #, n] < n) &] ] sol = {}; Do[If[iGeneralise[n] != {}, AppendTo[sol, n]], {n, 2, 100}]
PROG
(Haskell)
a126949 n = a126949_list !! (n-1)
a126949_list = filter h [1..] where
h m = not $ null [(x, e) | x <- [2 .. m - 2], gcd x m == 1,
e <- [2 .. a000010 m `div` 2],
x ^ e `mod` m == m - 1]
-- Reinhard Zumkeller, May 23 2013
(PARI) is_A126949(n)={for(x=2, n-2, gcd(x, n)>1&&next; my(t=Mod(x, n)); while(abs(centerlift(t))>1, t*=x); t==-1&&return(x))} \\ (Based on code for A178751 by Ch. Greathouse.) - M. F. Hasler, Jun 07 2016
CROSSREFS
KEYWORD
nonn,hear
AUTHOR
Emmanuel Amiot, Mar 19 2007
EXTENSIONS
Edited by M. F. Hasler, Jun 06 2016
STATUS
approved