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-6 of 6 results.

A059499 a(n) = |{m : multiplicative order of 2 mod m = n}|.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 2, 5, 3, 16, 1, 5, 5, 8, 1, 24, 1, 38, 9, 11, 3, 68, 6, 5, 4, 54, 7, 79, 1, 16, 11, 5, 13, 462, 3, 5, 13, 140, 3, 123, 7, 110, 54, 11, 7, 664, 2, 114, 29, 118, 7, 124, 59, 188, 13, 55, 3, 4456, 1, 5, 82, 96, 5, 353, 3, 118, 11, 485, 7
Offset: 1

Views

Author

Vladeta Jovovic, Feb 04 2001

Keywords

Comments

Also, number of primitive factors of 2^n - 1 (cf. A212953). - Max Alekseyev, May 03 2022
The multiplicative order of a mod m, gcd(a,m)=1, is the smallest natural number d for which a^d = 1 (mod m). See A002326.
a(n) is odd iff n is squarefree, A005117. - Thomas Ordowski, Jan 18 2014
The set S for which a(n) = |S| contains an odd number of prime powers p^k, where k > 0 and p == 3 (mod 4), iff n is squarefree and greater than one. - Isaac Saffold, Dec 28 2019

Examples

			a(3) = |{7}| = 1, a(4) = |{5,15}| = 2, a(6) = |{9,21,63}| = 3.
		

Crossrefs

Column k=2 of A212957.
Primitive factors of b^n - 1: this sequence (b=2), A059885 (b=3), A059886 (b=4), A059887 (b=5), A059888 (b=6), A059889 (b=7), A059890 (b=8), A059891 (b=9), A059892 (b=10).

Programs

  • Maple
    with(numtheory):
    a:= n-> add(mobius(n/d)*tau(2^d-1), d=divisors(n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, May 31 2012
  • Mathematica
    a[n_] := Sum[ MoebiusMu[n/d] * DivisorSigma[0, 2^d - 1], {d, Divisors[n]}]; Table[a[n], {n, 1, 71} ] (* Jean-François Alcover, Dec 12 2012 *)
  • PARI
    a(n) = sumdiv(n, d, moebius(n/d) * numdiv(2^d-1)); \\ Amiram Eldar, Jan 25 2025

Formula

a(n) = Sum_{d|n} A008683(n/d) * A046801(d) = Sum_{d|A007947(n)} A008683(d) * A046801(n/d). - Max Alekseyev, May 03 2022
a(n) = 1 iff 2^n-1 is noncomposite. a(prime(n)) = 2^A088863(n)-1. - Thomas Ordowski, Jan 16 2014

Extensions

More terms from John W. Layman, Mar 22 2002
More terms from Alois P. Heinz, May 31 2012

A089162 Triangle read by rows formed by the prime factors of Mersenne number 2^prime(n) - 1, n >= 1.

Original entry on oeis.org

3, 7, 31, 127, 23, 89, 8191, 131071, 524287, 47, 178481, 233, 1103, 2089, 2147483647, 223, 616318177, 13367, 164511353, 431, 9719, 2099863, 2351, 4513, 13264529, 6361, 69431, 20394401, 179951, 3203431780337, 2305843009213693951, 193707721, 761838257287
Offset: 1

Views

Author

Cino Hilliard, Dec 06 2003

Keywords

Comments

All factors of Mersenne numbers 2^p - 1, where p is prime, are == 1 (mod p). See the first Caldwell link for a proof of the statement that if q divides M_p = 2^p-1 then q = 2kp + 1 for some integer k. - Comment corrected by Jonathan Sondow, Dec 29 2016

Examples

			The 16th Mersenne number 2^53-1 has the three prime factors 6361, 69431, 20394401.
See tail end of second row in the sequence. Each factor is == 1 (mod 53).
Triangle begins:
  3;
  7;
  31;
  127;
  23, 89;
  8191;
  131071;
  524287;
  47, 178481;
  233, 1103, 2089;
  2147483647;
  223, 616318177;
  13367, 164511353;
  431, 9719, 2099863;
  2351, 4513, 13264529;
  6361, 69431, 20394401;
		

Crossrefs

Cf. A122094 (sorted version of this list).

Programs

  • Mathematica
    row[n_]:=First/@FactorInteger[2^Prime[n]-1]; Array[row,19]//Flatten (* Stefano Spezia, May 03 2024 *)
  • PARI
    mersenne(b,n,d) = { c=0; forprime(x=2,n, c++; y = b^x-1; f=factor(y); v=component(f,1); ln = length(v); if(ln>=d,print1(v[d]",")); ) }

Extensions

Definition corrected by Max Alekseyev, Jul 25 2023

A136033 a(n) = smallest number k such that number of prime factors of 2^k-1 is exactly n (counted with multiplicity).

Original entry on oeis.org

2, 4, 6, 16, 12, 18, 24, 40, 54, 36, 102, 110, 60, 72, 108, 140, 120, 156, 144, 200, 216, 210, 240, 180, 456, 288, 336, 300, 396, 480, 882, 360, 468, 700
Offset: 1

Views

Author

Artur Jasinski, Dec 11 2007

Keywords

Crossrefs

Programs

  • Maple
    N:= 24: # to get a(1) to a(N)
    unknown:= N:
    for k from 2 while unknown > 0 do
      q:= numtheory:-bigomega(2^k-1);
      if q <= N and not assigned(A[q]) then
         A[q]:= k;
         unknown:= unknown - 1;
      fi
    od:
    seq(A[i],i=1..N); # Robert Israel, Oct 24 2014
  • Mathematica
    Module[{nn=250,tbl},tbl=Table[{k,PrimeOmega[2^k-1]},{k,nn}];Table[SelectFirst[tbl,#[[2]]==n&],{n,24}]][[;;,1]] (* The program generates the first 24 terms of the sequence. *)  (* Harvey P. Dale, May 25 2025 *)
  • PARI
    a(n) = {k = 1; while(bigomega(2^k-1) != n, k++); k;} \\ Michel Marcus, Nov 04 2013

Extensions

a(15)-a(20) from Michel Marcus, Nov 04 2013
a(21)-a(24) from Derek Orr, Oct 23 2014
a(25)-a(34) from Jinyuan Wang, Jun 07 2019

A006514 Primes p such that 2^p - 1 has at most 2 prime factors.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 31, 37, 41, 59, 61, 67, 83, 89, 97, 101, 103, 107, 109, 127, 131, 137, 139, 149, 167, 197, 199, 227, 241, 269, 271, 281, 293, 347, 373, 379, 421, 457, 487, 521, 523, 607, 727, 809, 881, 971, 983, 997, 1061, 1063
Offset: 1

Views

Author

Keywords

Comments

For a composite n, number 2^n - 1 has at most 2 prime factors only if n = p^2, where p is prime from the intersection of A000043 and A156585. The only known such primes are 2, 3, 7. - Max Alekseyev, Apr 23 2019
a(54) >= 1277. - Max Alekseyev, Apr 23 2019

References

  • J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000043 (a subsequence), A001348, A088863.

Programs

  • Mathematica
    Select[Prime[Range[100]],PrimeOmega[2^#-1]<3&] (* Harvey P. Dale, Nov 11 2011 *)

Extensions

More terms from Sean A. Irvine, May 04 2017
Edited by Max Alekseyev, Apr 23 2019

A136034 a(n) = smallest number k such that number of distinct prime factors of 2^k-1 is exactly n.

Original entry on oeis.org

1, 2, 4, 8, 12, 20, 24, 40, 36, 48, 88, 60, 72, 150, 132, 120, 156, 144, 200, 204, 210, 180, 324, 476, 288, 300, 432, 396, 480, 360, 468, 576, 700, 504, 420, 648, 540, 660, 792, 720
Offset: 0

Views

Author

Artur Jasinski, Dec 11 2007

Keywords

Comments

First occurrence of n in A046800.

Crossrefs

Programs

  • Mathematica
    With[{pn1=PrimeNu[2^Range[800]-1]},Table[Position[pn1,n,1,1],{n,0,40}]]//Flatten (* Harvey P. Dale, Jan 10 2025 *)
  • PARI
    a(n) = my(k=1); while (omega(2^k-1) != n, k++); k; \\ Michel Marcus, Jan 09 2023

Extensions

More terms from Julián Aguirre, Feb 04 2013
a(31)-a(39) from Chai Wah Wu, Oct 03 2019
a(0) = 1 inserted by Michel Marcus, Jan 09 2023

A292473 Square array read by antidiagonals downwards: A(n,k) = k-th prime p such that A001222(2^p-1) = n.

Original entry on oeis.org

2, 3, 11, 5, 23, 29, 7, 37, 43, 157, 13, 41, 47, 173, 113, 17, 59, 53, 181, 151, 223, 19, 67, 71, 229, 163, 239
Offset: 1

Views

Author

Felix Fröhlich, Sep 17 2017

Keywords

Comments

A permutation of the prime numbers.
Is this the same as k-th prime p such that A001221(2^p-1) = n?

Examples

			Array starts
    2,   3,   5,   7,  13,  17, ....
   11,  23,  37,  41,  59,  67, ....
   29,  43,  47,  53,  71,  73, ....
  157, 173, 181, 229, 233, 263, ....
  113, 151, 163, 191, 251, 307, ....
  223, 239, 359, 463, 587, 641, ....
  ....
A(2, 3) = 37, because the 3rd prime p such that 2^p-1 has 2 prime factors is 37, with 2^37-1 = 223 * 616318177.
		

Crossrefs

Cf. A000043 (row 1), A135978 (row 2), A140745 (column 1).

Programs

  • Mathematica
    With[{s = Array[PrimeOmega[2^Prime@ # - 1] &, 50]}, Function[t, Function[u, Table[Prime@ u[[#, k]] &[n - k + 1], {n, Length@t}, {k, n, 1, -1}]]@ Map[PadRight[#, Length@ t] &, t]]@ Values@ KeySort@ PositionIndex@ s] // Flatten (* Michael De Vlieger, Sep 17 2017 *)

Extensions

More terms from Michael De Vlieger, Sep 17 2017
Showing 1-6 of 6 results.