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-10 of 18 results. Next

A001917 (p-1)/x, where p = prime(n) and x = ord(2,p), the smallest positive integer such that 2^x == 1 (mod p).

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 2, 1, 6, 1, 2, 3, 2, 1, 1, 1, 1, 2, 8, 2, 1, 8, 2, 1, 2, 1, 3, 4, 18, 1, 2, 1, 1, 10, 3, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 6, 1, 3, 8, 2, 10, 5, 16, 2, 1, 2, 3, 4, 3, 1, 3, 2, 2, 1, 11, 16, 1, 1, 4, 2, 2, 1, 1, 2, 1, 9, 2, 2, 1, 1, 10, 6, 6, 1, 2, 6, 1, 2, 1, 2, 2, 1, 3, 2, 1, 2, 1, 1, 1, 1, 1, 2
Offset: 2

Views

Author

Keywords

Comments

Also number of cycles in permutations constructed from siteswap juggling pattern 1234...p.
Also the number of irreducible polynomial factors for the polynomial (x^p-1)/(x-1) over GF(2), where p is the n-th prime. - V. Raman, Oct 04 2012
The sequence is unbounded: for any value of M, there exists an element of the sequence divisible by M. See the proof by David Speyer below. - Shreevatsa R, May 24 2013

References

  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 131.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
  • W. Meissner, Über die Teilbarkeit von 2^p-2 durch das Quadrat der Primzahl p = 1093, Sitzungsberichte Königlich Preussischen Akadamie Wissenschaften Berlin, 35 (1913), 663-667.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A006694 gives cycle counts of such permutations constructed for all odd numbers.
Cf. A014664.

Programs

  • Magma
    [ (p-1)/Modorder(2, p) where p is NthPrime(n): n in [2..100] ]; // Klaus Brockhaus, Dec 09 2008
    
  • Maple
    with(numtheory); [seq((ithprime(n)-1)/order(2,ithprime(n)),n=2..130)];
    with(group); with(numtheory); gen_rss_perm := proc(n) local a, i; a := []; for i from 1 to n do a := [op(a), ((2*i) mod (n+1))]; od; RETURN(a); end; count_of_disjcyc_seq := [seq(nops(convert(gen_rss_perm(ithprime(j)-1),'disjcyc')),j=2..)];
  • Mathematica
    a6694[n_] := Sum[ EulerPhi[d] / MultiplicativeOrder[2, d], {d, Divisors[2n + 1]}] - 1; a[n_] := a6694[(Prime[n]-1)/2]; Table[ a[n], {n, 2, 104}] (* Jean-François Alcover, Dec 14 2011, after Vladimir Shevelev *)
    Table[p = Prime[n]; (p - 1)/MultiplicativeOrder[2, p], {n, 2, 100}] (* T. D. Noe, Apr 11 2012 *)
    ord[n_]:=Module[{x=1},While[PowerMod[2,x,n]!=1,x++];(n-1)/x]; ord/@ Prime[ Range[ 2,110]] (* Harvey P. Dale, Jun 25 2014 *)
  • PARI
    {for(n=2, 100, p=prime(n); print1((p-1)/znorder(Mod(2, p)), ","))} \\ Klaus Brockhaus, Dec 09 2008
    
  • Python
    from sympy import prime, n_order
    def A001917(n):
        p = prime(n)
        return 1 if n == 2 else (p-1)//n_order(2,p) # Chai Wah Wu, Jan 15 2020

Formula

From Vladimir Shevelev, May 26 2008: (Start)
a(n) = A006694((p_n-1)/2) where p_n is the n-th odd prime.
Conjecture: k*a(n) = A006694(((p_n)^k-1)/2). (End)

Extensions

Additional comments from Antti Karttunen, Jan 05 2000
More terms from N. J. A. Sloane, Dec 24 2009

A115591 Primes p such that the multiplicative order of 2 modulo p is (p-1)/2.

Original entry on oeis.org

7, 17, 23, 41, 47, 71, 79, 97, 103, 137, 167, 191, 193, 199, 239, 263, 271, 311, 313, 359, 367, 383, 401, 409, 449, 463, 479, 487, 503, 521, 569, 599, 607, 647, 719, 743, 751, 761, 769, 809, 823, 839, 857, 863, 887, 929, 967, 977, 983, 991, 1009, 1031
Offset: 1

Views

Author

Don Reble, Mar 11 2006

Keywords

Comments

It appears that this is also the sequence of values of n for which the sum of terms of one period of the base-2 MR-expansion (see A136042) of 1/n equals (n-1)/2. An example appears in A155072 where one period of the base-2 MR-expansion of 1/17 is shown to be {5,1,1,1} with sum 8=(17-1)/2. - John W. Layman, Jan 19 2009
If p is a term of this sequence, then 2 is a quadratic residue module p, so p == 1, 7 (mod 8). - Jianing Song, Nov 01 2024

Crossrefs

Cf. A136042, A155072. - John W. Layman, Jan 19 2009

Programs

  • Magma
    [ p: p in PrimesUpTo(1031) | r eq 1 and Order(R!2) eq q where q,r is Quotrem(p,2) where R is ResidueClassRing(p) ]; // Klaus Brockhaus, Dec 02 2008
    
  • Mathematica
    fQ[n_] := 1 + 2 MultiplicativeOrder[2, n] == n; Select[ Prime@ Range@ 174, fQ]
  • PARI
    r=2;forprime(p=3,1500,z=(p-1)/znorder(Mod(r,p));if(z==2,print1(p,", "))); \\ Joerg Arndt, Jan 12 2011

A001134 Primes p such that the multiplicative order of 2 modulo p is (p-1)/4.

Original entry on oeis.org

113, 281, 353, 577, 593, 617, 1033, 1049, 1097, 1153, 1193, 1201, 1481, 1601, 1889, 2129, 2273, 2393, 2473, 3049, 3089, 3137, 3217, 3313, 3529, 3673, 3833, 4001, 4217, 4289, 4457, 4801, 4817, 4937, 5233, 5393, 5881, 6121, 6521, 6569, 6761, 6793, 6841, 7129, 7481, 7577, 7793, 7817, 7841, 8209
Offset: 1

Views

Author

Keywords

Comments

The multiplicative order of x modulo y is the smallest positive number m such that x^m is congruent to 1 mod y.

References

  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 59.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [ p: p in PrimesUpTo(6761) | r eq 1 and Order(R!2) eq q where q,r is Quotrem(p,4) where R is ResidueClassRing(p) ]; // Klaus Brockhaus, Dec 02 2008
    
  • Mathematica
    Reap[For[p = 2, p <= 6761, p = NextPrime[p], If[ MultiplicativeOrder[2, p] == (p-1)/4, Sow[p]]]][[2, 1]] (* Jean-François Alcover, May 17 2013 *)
  • PARI
    forprime(p=3,10^4,if(znorder(Mod(2,p))==(p-1)/4,print1(p,", "))); \\ Joerg Arndt, May 17 2013
    
  • PARI
    oddres(n)=n>>valuation(n, 2)
    cyc(d)=my(k=1, t=1,y=(d-5)/(2*3)+1); while((t=oddres(t+d))>1 && k<=y, k++); k
    forstep(n=1, 241537, [16,8], if(cyc(n)==n>>3,print1(n", "))) ; \\ Charles R Greathouse IV, May 18 2013

Extensions

More terms and better definition from Don Reble, Mar 11 2006

A001135 Primes p such that the multiplicative order of 2 modulo p is (p-1)/5.

Original entry on oeis.org

251, 571, 971, 1181, 1811, 2011, 2381, 2411, 3221, 3251, 3301, 3821, 4211, 4861, 4931, 5021, 5381, 5861, 6221, 6571, 6581, 8461, 8501, 9091, 9461, 10061, 10211, 10781, 11251, 11701, 11941, 12541, 13171, 13381, 13421, 13781, 14251, 15541, 16091, 16141, 16451, 16661, 16691, 16811, 17291
Offset: 1

Views

Author

Keywords

References

  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 59.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [ p: p in PrimesUpTo(15541) | r eq 1 and Order(R!2) eq q where q,r is Quotrem(p,5) where R is ResidueClassRing(p) ]; // Klaus Brockhaus, Dec 02 2008
    
  • Maple
    q:= p-> isprime(p) and numtheory[order](2, p)=(p-1)/5:
    select(q, [$2..20000])[];  # Alois P. Heinz, Dec 12 2023
  • Mathematica
    Reap[For[p = 2, p <= 18000, p = NextPrime[p], If[ MultiplicativeOrder[2, p] == (p-1)/5, Sow[p]]]][[2, 1]] (* James C. McMahon, Dec 12 2023 *)
  • PARI
    forprime(p=3,10^5,if(znorder(Mod(2,p))==(p-1)/5,print1(p,", "))); \\ Joerg Arndt, May 17 2013

Extensions

More terms and better definition from Don Reble, Mar 11 2006

A001136 Primes p such that the multiplicative order of 2 modulo p is (p-1)/6.

Original entry on oeis.org

31, 223, 433, 439, 457, 727, 919, 1327, 1399, 1423, 1471, 1831, 1999, 2017, 2287, 2383, 2671, 2767, 2791, 2953, 3271, 3343, 3457, 3463, 3607, 3631, 3823, 3889, 4129, 4423, 4519, 4567, 4663, 4729, 4759, 5167, 5449, 5503, 5953, 6007, 6079, 6151, 6217, 6271, 6673, 6961, 6967, 7321
Offset: 1

Views

Author

Keywords

References

  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 59.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001133.

Programs

  • Magma
    [ p: p in PrimesUpTo(6079) | r eq 1 and Order(R!2) eq q where q,r is Quotrem(p,6) where R is ResidueClassRing(p) ]; // Klaus Brockhaus, Dec 02 2008
    
  • Mathematica
    Reap[For[p = 2, p < 10^4, p = NextPrime[p], If[MultiplicativeOrder[2, p] == (p - 1)/6, Sow[p]]]][[2, 1]] (* Jean-François Alcover, Dec 10 2015, adapted from PARI *)
  • PARI
    forprime(p=3,10^4,if(znorder(Mod(2,p))==(p-1)/6,print1(p,", "))); \\ Joerg Arndt, May 17 2013

Extensions

More terms and better definition from Don Reble, Mar 11 2006

A101208 Smallest odd prime p such that n = (p - 1) / ord_p(2).

Original entry on oeis.org

3, 7, 43, 113, 251, 31, 1163, 73, 397, 151, 331, 1753, 4421, 631, 3061, 257, 1429, 127, 6043, 3121, 29611, 1321, 18539, 601, 15451, 14327, 2971, 2857, 72269, 3391, 683, 2593, 17029, 2687, 42701, 11161, 13099, 1103, 71293, 13121, 17467, 2143, 83077, 25609, 5581
Offset: 1

Views

Author

Leigh Ellison (le(AT)maths.gla.ac.uk), Dec 14 2004

Keywords

Comments

First time n appears is given in A001917.
Smallest p (let it be the k-th prime) such that A001917(k) = n, or the smallest prime which has ratio n in base 2.
First cyclic number (in base 2) of n-th degree (or n-th order): the reciprocals of these numbers belong to one of n different cycles. Each cycle has (a(n) - 1)/n digits.
Conjecture: a(n) is defined for all n.
Recursive by indices: (See A054471)
1, 3, 43, 83077, ...
2, 7, 1163, ...
4, 113, 257189, ...
5, 251, 6846277, ...
6, 31, 683, ...
8, 73, 472019, ...
9, 397, 13619483, ...
10, 151, 349717, ...
...
The records for the ratio in base 2 are: 1, 2, 6, 8, 18, 24, 31, 38, 72, 105, 129, 630, 1285, 1542, 2048, ..., the primes are: 3, 7, 31, 73, 127, 601, 683, 1103, 1801, 2731, 5419, 8191, 43691, 61681, 65537, ...
(Updated by Eric Chen, Jun 01 2015)

Crossrefs

Cf. A001122, A115591, A001133, A001134, A001135, A001136, A152307, A152308, A152309, A152310, A152311, which are sequences of primes p where the period of the reciprocal in base 2 is (p-1)/n for n=1 to 11.

Programs

  • Mathematica
    f[n_Integer] := Block[{k = 1, p}, While[p = k*n + 1; ! PrimeQ[p] || p != 1 + n*MultiplicativeOrder[2, p] || p = 2, k++]; p]; Array[f, 128] (* Eric Chen, Jun 01 2015 *)
  • PARI
    a(n) = {p=3; ok = 0; until(ok, if (n == (p-1)/znorder(Mod(2, p)), ok = 1, p = nextprime(p+1));); return (p);} \\ Michel Marcus, Jun 27 2013

A293394 Numbers k such that (2*k-1)*(2^((k-1)/4)) == 1 (mod k).

Original entry on oeis.org

1, 17, 41, 97, 137, 193, 241, 313, 401, 409, 433, 449, 457, 521, 569, 641, 673, 761, 769, 809, 857, 929, 953, 977, 1009, 1129, 1297, 1321, 1361, 1409, 1489, 1657, 1697, 1873, 1993, 2017, 2081, 2137, 2153, 2161
Offset: 1

Views

Author

Jonas Kaiser, Nov 09 2017

Keywords

Comments

It appears that many elements of this sequence are prime. The first "pseudoprime" in this sequence is 74665.

Crossrefs

Programs

A294717 Numbers k such that 2^((k-1)/3) == 1 (mod k) and (2*k-1)*(2^((k-1)/6)) == 1 (mod k).

Original entry on oeis.org

1, 43, 109, 157, 229, 277, 283, 307, 397, 499, 643, 691, 733, 739, 811, 997, 1021, 1051, 1069, 1093, 1459, 1579, 1597, 1627, 1699, 1723, 1789, 1933, 2179, 2203, 2251, 2341, 2347, 2731, 2749, 2917, 2971, 3061, 3163, 3181, 3229, 3259, 3277, 3331, 3373, 3541, 4027
Offset: 1

Views

Author

Jonas Kaiser, Nov 07 2017

Keywords

Comments

Most of the elements of this sequence are prime. The "pseudoprimes" of these sequence are part of A244626.

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 6001, 6], # == 1 || PowerMod[2, (#-1)/3, #] == 1 && Mod[-PowerMod[2, (#-1)/6, #], #] == 1&] (* Jean-François Alcover, Nov 18 2018 *)
  • PARI
    is(n)=n%6==1 && Mod(2,n)^(n\3)==1 && (2*n-1)*Mod(2,n)^(n\6)==1 \\ Charles R Greathouse IV, Nov 08 2017

A115586 Prime moduli p for which 2 is neither a quadratic residue nor a primitive root.

Original entry on oeis.org

43, 109, 157, 229, 251, 277, 283, 307, 331, 397, 499, 571, 643, 683, 691, 733, 739, 811, 971, 997, 1013, 1021, 1051, 1069, 1093, 1163, 1181, 1429, 1459, 1579, 1597, 1613, 1627, 1699, 1709, 1723, 1789, 1811, 1933, 2003, 2011, 2179, 2203, 2251
Offset: 1

Views

Author

Don Reble, Mar 11 2006

Keywords

Crossrefs

Intersection of A216838 and A003629.

Programs

  • Maple
    select(p -> isprime(p) and numtheory:-order(2,p) <> p-1, [seq(seq(8*i+j,j=[3,5]),i=1..1000)]); # Robert Israel, Apr 02 2018
  • Mathematica
    Select[Prime[Range[400]], MultiplicativeOrder[2, #] != # - 1 && JacobiSymbol[2, #] == -1 &] (* Alonso del Arte, Jun 08 2014 *)
  • PARI
    is(n)=n>2&&isprime(n)&&kronecker(2,n)!=1&&znprimroot(n)!=2 \\ Lear Young, Mar 26 2014

A059914 Primes p such that x^3 = 2 has more than one solution mod p and the sum of the (three) solutions is 2*p.

Original entry on oeis.org

43, 109, 127, 157, 223, 277, 283, 307, 433, 733, 1069, 1399, 1423, 1471, 1579, 1597, 1627, 1723, 1777, 1789, 1801, 1831, 2017, 2089, 2143, 2287, 2689, 2749, 2917, 3163, 3181, 3271, 3343, 3541, 3607, 3631, 3823, 3889, 4057, 4129, 4153, 4177, 4339, 4513
Offset: 1

Views

Author

Klaus Brockhaus, Mar 02 2001

Keywords

Comments

Subsequence of A040028 and of A014752, complement of A059899 relative to A014752. Solutions mod p are represented by integers from 0 to p-1.

Crossrefs

Showing 1-10 of 18 results. Next