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.

Previous Showing 21-30 of 67 results. Next

A014491 a(n) = gcd(n, 2^n - 1).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 9, 1, 5, 7, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 9, 1, 1, 1, 5, 1, 21, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 27, 1, 1, 1, 1, 1, 15, 1, 1, 7, 1, 1, 3, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 3, 1, 5, 1, 1, 1, 21, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 3, 1, 1
Offset: 1

Views

Author

Gary M. Mcguire (gmm8n(AT)weyl.math.virginia.edu)

Keywords

Comments

Also the GCD of the "binary n-th powers", the set of positive integers whose base-2 representation consists of a block of bits repeated n times consecutively. - Jeffrey Shallit, Jan 16 2018
prime(k) for k >= 2 divides a(n) if and only if n is divisible by prime(k)*A014664(k). - Robert Israel, Jan 16 2018

Crossrefs

Cf. A014664.

Programs

A380533 a(n) is the multiplicative order of -6 modulo prime(n); a(1) = a(2) = 0 for completion.

Original entry on oeis.org

0, 0, 2, 1, 5, 12, 16, 18, 22, 7, 3, 4, 40, 6, 46, 13, 29, 60, 66, 70, 36, 39, 41, 88, 12, 5, 51, 53, 108, 112, 63, 65, 136, 46, 74, 75, 156, 54, 166, 86, 89, 60, 38, 96, 7, 99, 210, 111, 113, 228, 232, 34, 20, 125, 256, 262, 67, 135, 276, 56
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105878 (primes having primitive root -6).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, this sequence, A380540, A380541, A380542, A385222.

Programs

  • Mathematica
    A380533[n_] := If[n < 3, 0, MultiplicativeOrder[-6, Prime[n]]];
    Array[A380533, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-6}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A380540 a(n) is the multiplicative order of -7 modulo prime(n); a(4) = 0 for completion.

Original entry on oeis.org

1, 2, 4, 0, 5, 12, 16, 6, 11, 14, 30, 18, 40, 3, 46, 13, 58, 60, 33, 35, 24, 39, 82, 88, 96, 100, 102, 53, 54, 7, 63, 130, 68, 138, 37, 75, 52, 81, 166, 172, 89, 12, 5, 24, 49, 198, 105, 74, 226, 228, 116, 119, 240, 250, 256, 131, 268, 270, 69, 20
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105879 (primes having primitive root -7).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, A380533, this sequence, A380541, A380542, A385222.

Programs

  • Mathematica
    A380540[n_] := If[n == 4, 0, MultiplicativeOrder[-7, Prime[n]]];
    Array[A380540, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-7}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A380541 a(n) is the multiplicative order of -8 modulo prime(n); a(1) = 0 for completion.

Original entry on oeis.org

0, 1, 4, 2, 5, 4, 8, 3, 22, 28, 10, 12, 20, 7, 46, 52, 29, 20, 11, 70, 6, 26, 41, 22, 16, 100, 34, 53, 12, 28, 14, 65, 68, 23, 148, 10, 52, 27, 166, 172, 89, 60, 190, 32, 196, 66, 35, 74, 113, 76, 58, 238, 8, 25, 16, 262, 268, 90, 92, 35
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105880 (primes having primitive root -8).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, A380533, A380540, this sequence, A380542, A385222.

Programs

  • Mathematica
    A380541[n_] := If[n == 1, 0, MultiplicativeOrder[-8, Prime[n]]];
    Array[A380541, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-8}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

Formula

a(n) = ord(-2,p)/gcd(ord(-2,p),3) for p != 2, where p = prime(n), and ord(a,m) is the multiplicative order of a modulo m. Note that ord(-2,p) = A337878(n) for n > 2.

A380542 a(n) is the multiplicative order of -9 modulo prime(n); a(2) = 0 for completion.

Original entry on oeis.org

1, 0, 1, 6, 10, 6, 8, 18, 22, 7, 30, 18, 4, 42, 46, 13, 58, 10, 22, 70, 3, 78, 82, 44, 24, 25, 34, 106, 54, 56, 126, 130, 68, 138, 37, 50, 78, 162, 166, 43, 178, 90, 190, 8, 49, 198, 210, 222, 226, 114, 116, 238, 60, 250, 128, 262, 67, 30, 138, 140
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105881 (primes having primitive root -9).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, A380533, A380540, A380541, this sequence, A385222.

Programs

  • Mathematica
    A380542[n_] := If[n == 2, 0, MultiplicativeOrder[-9, Prime[n]]];
    Array[A380542, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-9}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A385222 a(n) is the multiplicative order of -10 modulo prime(n); a(1) = a(3) = 0 for completion.

Original entry on oeis.org

0, 2, 0, 3, 1, 3, 16, 9, 11, 28, 30, 6, 10, 42, 23, 26, 29, 60, 66, 70, 8, 26, 82, 44, 96, 4, 17, 106, 108, 112, 21, 65, 8, 23, 148, 150, 39, 162, 83, 86, 89, 180, 190, 192, 49, 198, 15, 111, 226, 228, 232, 14, 15, 25, 256, 131, 268, 10, 138, 28
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A007348 (primes having primitive root -10).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, A380533, A380540, A380541, A380542, this sequence.

Programs

  • Mathematica
    A385222[n_] := If[n == 1 || n == 3, 0, MultiplicativeOrder[-10, Prime[n]]];
    Array[A385222, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-10}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A081858 Numbers k such that 2*k+1 divides 2^k-1.

Original entry on oeis.org

0, 3, 8, 11, 15, 20, 23, 35, 36, 39, 44, 48, 51, 56, 63, 68, 75, 83, 95, 96, 99, 111, 116, 119, 120, 128, 131, 135, 140, 155, 156, 168, 170, 176, 179, 183, 191, 200, 204, 215, 216, 219, 224, 228, 231, 239, 243, 251, 260, 280, 284, 288, 296, 299, 300, 303, 308
Offset: 1

Views

Author

Benoit Cloitre, Apr 11 2003

Keywords

Comments

From Chris Boyd, Mar 16 2014: (Start)
n is a term if and only if n=0, 2n+1 is a prime of the form 8k+-1, or 2n+1 is an Euler pseudoprime satisfying 2^n == 1 mod 2n+1.
Case 1: 0 is a term. Case 2, 2n+1 prime: by Euler's criterion and the quadratic character of 2, 2^n == 1 mod 2n+1 only if 2n+1 is of the form 8k+-1. Case 3, 2n+1 composite: 2^n == 1 mod 2n+1 only if 2n+1 is one of the subset of Euler pseudoprimes satisfying 2^n == 1 mod 2n+1.
The first term for which 2n+1 is a qualifying Euler pseudoprime is n=170.
The first Euler pseudoprime that does not correspond to a term is 3277, because 2^((3277-1)/2) == -1 mod 3277. (End)

Crossrefs

Programs

  • Mathematica
    Join[{0}, Select[Range[300], PowerMod[2, #, 2*# + 1] === 1 &]] (* Amiram Eldar, Jun 02 2022 *)
  • PARI
    isok(n) = !((2^n-1) % (2*n+1)); \\ Michel Marcus, Dec 04 2013
    
  • PARI
    for(n=0,400,if(n%znorder(Mod(2,2*n+1))==0,print1(n","))) \\ Chris Boyd, Mar 16 2014, after Michael Somos in A002326

Formula

k such that A002326(k)|k: since 2^k == 1 mod 2*k+1, k must be a multiple of the order of 2 mod 2*k+1.

Extensions

Formula corrected by Chris Boyd, Mar 16 2014

A072936 Primes p that do not divide 2^x+1 for any x>=1.

Original entry on oeis.org

2, 7, 23, 31, 47, 71, 73, 79, 89, 103, 127, 151, 167, 191, 199, 223, 233, 239, 263, 271, 311, 337, 359, 367, 383, 431, 439, 463, 479, 487, 503, 599, 601, 607, 631, 647, 719, 727, 743, 751, 823, 839, 863, 881, 887, 911, 919, 937, 967, 983, 991, 1031, 1039, 1063
Offset: 1

Views

Author

Benoit Cloitre, Aug 20 2002

Keywords

Comments

Also, primes p such that p^2 does not divide 2^x+1 for any x>=1.
A prime p cannot divide 2^x+1 if the multiplicative order of 2 (mod p) is odd. - T. D. Noe, Aug 22 2004
Differs from A049564 first at p=6529, which is the 250th entry in A049564 related to 279^32 =2 mod 6529, but absent here because 6529 divides 2^51+1. [From R. J. Mathar, Sep 25 2008]

References

  • A. K. Devaraj, "Euler's Generalization of Fermat's Theorem-A Further Generalization", in ISSN #1550-3747, Proceedings of Hawaii Intl Conference on Statistics, Mathematics & Related Fields, 2004.

Crossrefs

Cf. A040098, A049096, A014664 (multiplicative order of 2 mod n-th prime).

Extensions

Edited by T. D. Noe, Aug 22 2004

A108974 Sort the primes (except 2) according to the multiplicative order of 2 modulo that prime. If two primes have the same order of 2, they are arranged numerically.

Original entry on oeis.org

3, 7, 5, 31, 127, 17, 73, 11, 23, 89, 13, 8191, 43, 151, 257, 131071, 19, 524287, 41, 337, 683, 47, 178481, 241, 601, 1801, 2731, 262657, 29, 113, 233, 1103, 2089, 331, 2147483647, 65537, 599479, 43691, 71, 122921, 37, 109, 223, 616318177, 174763, 79
Offset: 1

Views

Author

Douglas Stones (dssto1(AT)student.monash.edu.au), Jul 27 2005

Keywords

Comments

Or, primitive prime divisors of the Mersenne numbers 2^n-1 (see A000225) in their order of occurrence.
Of course the Mersenne primes 2^p-1 (cf. A000043) appear in this sequence.
If all odd positive numbers, not just the odd primes, are sorted in this way, the result is A059912. - Jeppe Stig Nielsen, Feb 13 2020

Examples

			The order of 2 modulo 3 is 2 and the order of 2 modulo 7 is 3. So 3 comes before 7.
		

Crossrefs

Programs

  • Mathematica
    a = 1; DeleteDuplicates[Flatten[#[[All, 1]] & /@ FactorInteger[Table[a = 2 a + 1, {i, 1, 30}]]]] (* Horst H. Manninger, Mar 20 2021 *)
  • PARI
    do(n)=my(v=List(),P=1,g,t,f); for(k=2,n, t=2^k-1; g=P; while((g=gcd(g,t))>1, t/=g); f=factor(t)[,1]; for(i=1,#f, listput(v,f[i])); P*=t); Vec(v) \\ Charles R Greathouse IV, Sep 23 2016

Extensions

More terms from Martin Fuller, Sep 25 2006

A243905 Multiplicative order of 2 modulo prime(n)^2 for n >= 2.

Original entry on oeis.org

6, 20, 21, 110, 156, 136, 342, 253, 812, 155, 1332, 820, 602, 1081, 2756, 3422, 3660, 4422, 2485, 657, 3081, 6806, 979, 4656, 10100, 5253, 11342, 3924, 3164, 889, 17030, 9316, 19182, 22052, 2265, 8164, 26406, 13861, 29756, 31862, 32580, 18145, 18528, 38612
Offset: 2

Views

Author

Felix Fröhlich, Jun 14 2014

Keywords

Comments

p=prime(n) is in A001220 if and only if a(n) is equal to A014664(n). So far this is known to hold only for p=1093 and p=3511.
This happens for n=183 and 490, that is for p=prime(183)=1093 and p=prime(490)=3511, with values 364 and 1755 (see b-files). - Michel Marcus, Jun 29 2014
If 2^q-1 is p=prime(n), i.e., for n in A016027, then a(n)=pq and lpf(2^a(n)-1)=p. - Thomas Ordowski, Feb 04 2019

Crossrefs

Programs

  • Maple
    seq(numtheory:-order(2, ithprime(i)^2), i=2..1000); # Robert Israel, Jul 08 2014
  • Mathematica
    Table[MultiplicativeOrder[2, Prime[n]^2], {n, 2, 100}] (* Jean-François Alcover, Jul 08 2014 *)
  • PARI
    forprime(p=3, 10^2, print1(znorder(Mod(2, p^2)), ", "))

Formula

a(n) = prime(n)*A014664(n) for all odd primes that are not Wieferich. - Thomas Ordowski, Feb 04 2019
Previous Showing 21-30 of 67 results. Next