A002323 ((2^m - 1) / p) mod p, where p = prime(n) and m = ord(2,p).
1, 3, 1, 5, 3, 15, 3, 20, 1, 1, 1, 32, 37, 22, 36, 8, 36, 10, 1, 7, 49, 48, 23, 77, 92, 81, 13, 95, 49, 1, 17, 95, 30, 96, 66, 132, 67, 107, 3, 50, 148, 25, 52, 175, 167, 109, 143, 201, 99, 30, 13, 207, 200, 255, 64, 260, 190, 208, 159, 208, 78, 98, 243, 60
Offset: 2
Examples
For p = prime(3) = 5, we find that m = 4 is the smallest positive integer for which 2^m - 1 is divisible by p. So a(3) = ((2^4 - 1) / 5) mod 5 = 3. - _Eric M. Schmidt_, Jun 21 2013
References
- D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
- W. Meißner, Über die Teilbarkeit von 2^p-2 durch das Quadrat der Primzahl p=1093, Sitzungsberichte der Königlich Preußischen Akadamie der 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).
Links
- Eric M. Schmidt, Table of n, a(n) for n = 2..10000
- 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. [Annotated scanned copy]
Programs
-
Mathematica
Table[p = Prime[n]; Mod[(2^MultiplicativeOrder[2, p] - 1)/p, p], {n, 2, 100}] (* T. D. Noe, Jun 21 2013 *)
-
PARI
a(n) = my(p=prime(n));(lift(Mod(2,p^2)^znorder(Mod(2,p)))-1)/p \\ Jeppe Stig Nielsen, May 30 2023
-
Sage
def A002323(n) : p = nth_prime(n); return (2^(Mod(2,p).multiplicative_order()) - 1) // p % p # Eric M. Schmidt, Jun 21 2013
Extensions
Proper definition added by and more terms from Eric M. Schmidt, Jun 21 2013
Comments