cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A274003 Primitive terms (not equal twice a smaller term) of A178751: moduli n such that x^y == -1 (mod n) only for x = -1 (mod n).

Original entry on oeis.org

2, 3, 15, 20, 51, 68, 255, 340, 771, 1028, 3855, 5140, 13107, 17476, 65535, 87380, 196611, 262148, 983055
Offset: 1

Views

Author

M. F. Hasler, Jun 06 2016

Keywords

Comments

See A178751 for further information. In particular, A038192 is the subsequence of odd terms.

Crossrefs

Programs

  • PARI
    is_A274003(n)={is_A178751(n) && (bittest(n,0) || !is_A178751(n\2))}
    
  • PARI
    select( n -> bittest(n,0) || !setsearch(A178751,n\2), A178751) \\ assuming the vector A178751 holds enough terms of that sequence.

A126949 Moduli n for which -1 is a (nontrivial) power residue for some power greater than 2, i.e., m^k == -1 (mod n) for some k > 1 and some 1 < m < n-1.

Original entry on oeis.org

5, 7, 9, 10, 11, 13, 14, 17, 18, 19, 21, 22, 23, 25, 26, 27, 28, 29, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90
Offset: 1

Views

Author

Emmanuel Amiot, Mar 19 2007

Keywords

Comments

The complement of A178751 (within integers > 1). - M. F. Hasler, Jun 06 2016

Examples

			19 is in the sequence because -1 == 10^9 (mod 19).
		

Crossrefs

Programs

  • 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
    
  • 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}]
  • 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

Extensions

Edited by M. F. Hasler, Jun 06 2016

A274021 Least positive x < n-1 such that x^y == -1 (mod n) for some y > 1, or 0 if no such x exist.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 3, 0, 2, 3, 2, 0, 2, 3, 0, 0, 2, 5, 2, 0, 5, 7, 5, 0, 2, 5, 2, 3, 2, 0, 3, 0, 2, 3, 19, 11, 2, 3, 17, 0, 2, 5, 2, 7, 14, 5, 5, 0, 3, 3, 0, 23, 2, 5, 19, 31, 2, 3, 2, 0, 2, 3, 5, 0, 2, 17, 2, 0, 5, 19, 7, 23, 3, 3, 14, 3, 6, 17, 3, 0, 2, 3, 2, 47, 13, 3, 5, 7, 3, 29, 10
Offset: 1

Views

Author

M. F. Hasler, Jun 07 2016

Keywords

Comments

Indices of nonzero terms are listed in A126949 (in this sense the present sequence can be seen as characteristic function of A126949), indices of zeros (except for n=1) are given in A178751. Without the restriction x < n-1, one would have a(n) = n-1 instead of the zeros, since (n-1)^3 = (-1)^3 = -1 (mod n) for all n.

Crossrefs

Programs

  • PARI
    A274021(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))}
Showing 1-3 of 3 results.