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

A097407 a(n) = (A097406(n) - 1)/n.

Original entry on oeis.org

0, 1, 2, 1, 6, 0, 18, 2, 8, 1, 8, 1, 630, 3, 10, 16, 7710, 1, 27594, 2, 16, 31, 7760, 10, 72, 105, 9728, 4, 72, 11, 69273666, 2048, 18166, 1285, 3512, 3, 16657248, 4599, 3112, 1542, 4012472, 129, 48834, 48, 518, 60787, 282224, 14, 90462791808, 81, 218, 31
Offset: 1

Views

Author

Marco Matosic, Aug 16 2004

Keywords

Crossrefs

Extensions

Edited by Vladeta Jovovic, Aug 26 2004

A186522 Smallest prime factor of 2^n - 1 having the form k*n + 1.

Original entry on oeis.org

3, 7, 5, 31, 7, 127, 17, 73, 11, 23, 13, 8191, 43, 31, 17, 131071, 19, 524287, 41, 127, 23, 47, 241, 601, 2731, 262657, 29, 233, 31, 2147483647, 257, 599479, 43691, 71, 37, 223, 174763, 79, 41, 13367, 43, 431, 89, 631, 47, 2351, 97, 4432676798593, 251, 103, 53, 6361, 87211, 881, 113, 32377, 59, 179951, 61
Offset: 2

Views

Author

T. D. Noe, Feb 23 2011

Keywords

Comments

The values of k are in A186283.
From Zhi-Wei Sun, Dec 27 2016: (Start)
For any odd prime p, by Fermat's little theorem p = (p-1) + 1 divides 2^(p-1) - 1, and it is well-known that any prime divisor q of 2^p - 1 must be congruent to 1 modulo p.
Conjecture: a(n) exists for any integer n > 1 (verified for n = 2..300). (End)
Proof of the above conjecture: By Bang's theorem, for each n > 1 except 6 there exists an odd prime p such that the multiplicative order of 2 modulo p is n, and therefore n must divide p-1. Note that a(n) <= p. - Robert Israel and Thomas Ordowski, Sep 08 2017
For prime p, a(p) = 2p + 1 if and only if p is a Lucasian prime (A002515). - Thomas Ordowski, Sep 08 2017

Examples

			For n = 4, the prime factors of 2^n - 1 are 3 and 5, but only 5 has the form k * n + 1. Hence a(4) = 5.
a(254) = 56713727820156410577229101238628035243 since this prime number is equal to (2^127+1)/3 and congruent to 1 modulo 127, and 2^127 - 1 is a Mersenne prime.
a(257) = 535006138814359 since this is a prime congruent to 1 modulo 257 and 2^257 - 1 = 535006138814359*p*q with p = 1155685395246619182673033 and q = 374550598501810936581776630096313181393 both prime. - _Zhi-Wei Sun_, Dec 27 2016
		

Crossrefs

Cf. A000040, A000225, A060443 (all prime factors of 2^n-1).

Programs

  • Mathematica
    Table[p = First/@FactorInteger[2^n - 1]; Select[p, Mod[#1, n] == 1 &, 1][[1]], {n, 2, 60}]
  • PARI
    a(n)=my(s=if(n%2,2*n,n));forstep(p=s+1,2^n-1,s, if(Mod(2,p)^n==1&&isprime(p), return(p))) \\ Charles R Greathouse IV, Sep 07 2017
    
  • PARI
    a(n)=my(f=factor(2^n-1)[,1]); for(i=1,#f, if(f[i]%n==1, return(f[i]))) \\ Charles R Greathouse IV, Sep 07 2017

Formula

a(p - 1) = p for odd prime p. - Thomas Ordowski, Sep 04 2017
A002326((a(n)-1)/2) divides n for all n > 1. - Thomas Ordowski, Sep 07 2017
a(n) = A186283(n) * n + 1. - Max Alekseyev, Apr 27 2022

Extensions

Terms to a(300) in b-file from Zhi-Wei Sun, Dec 27 2016
a(301)-a(1200) in b-file from Charles R Greathouse IV, Sep 07 2017
a(1201)-a(1236) in b-file from Max Alekseyev, Apr 27 2022

A279095 Smallest k such that sigma(2^(k*n)) is prime.

Original entry on oeis.org

1, 1, 2, 1, 6, 1, 18, 2, 2, 3, 8, 1, 40, 9, 2, 1, 177728, 1, 120, 3, 6, 4, 32906, 95, 868, 20, 1648, 346, 1996040, 1, 700, 623, 134, 88864, 284, 1236, 821688, 60
Offset: 1

Views

Author

Jon E. Schoenfield, Mar 11 2017

Keywords

Comments

Equivalently, smallest k such that k*n + 1 is a Mersenne exponent (A000043).
As of Mar 11 2017, the j-th Mersenne exponent A000043(j) is known for j=1..45; four additional terms of A000043 are listed in the Extensions for that sequence, but it is not yet known whether they are A000043(46) through A000043(49). None of the first 45 Mersenne exponents are of the form k*29 + 1, so a(29) > floor((A000043(45) - 1)/29) = floor((37156667 - 1)/29) = 1281264. However, one of the four additional terms is 57885161 = 1996040*29 + 1; thus, 1281264 < a(29) <= 1996040.
a(39) > floor((A000043(45) - 1)/39) = 952735.
This sequence coincides with A186283 (Least number k such that k*n+1 is a prime dividing 2^n-1) from a(2) through a(8), but a(9) = 2 whereas A186283(9) = 8.

Examples

			a(1) = 1 because sigma(2^(1*1)) = sigma(2) = 1 + 2 = 3 is prime. (1*1 + 1 = 2 = A000043(1).)
a(3) = 2 because sigma(2^(1*3)) = sigma(2^3) = 1 + 2 + 4 + 8 = 15 is not prime, but sigma(2^(2*3)) = sigma(2^6) = 1 + 2 + 4 + 8 + 16 + 32 + 64 = 127 is prime. (1*3 + 1 = 4 is not in A000043, but 2*3 + 1 = 7 = A000043(4).)
a(17) = 177728 because sigma(2^(177728*17)) is prime and sigma(2^(k*17)) is not prime for any k < 177728. (177728*17 + 1 = 3021377 = A000043(37), and no Mersenne exponent less than A000043(37) is of the form k*17 + 1.)
		

Crossrefs

Programs

  • PARI
    a(n) = k=1; while(!isprime(sigma(2^(k*n))), k++); k; \\ Michel Marcus, Mar 12 2017

Extensions

a(29)-a(38) from Jinyuan Wang, Mar 25 2023

A185343 Least positive number k such that k*p+1 divides 2^p+1 where p is prime(n), or 0 if no such number exists.

Original entry on oeis.org

2, 0, 2, 6, 62, 210, 2570, 9198, 121574, 2, 23091222, 48, 2, 68186767614, 6, 2, 48, 12600235023025650, 109368, 794502, 24, 2550476412689091085878, 6, 2, 10, 8367330694575771627040945250, 4030501264, 6, 955272, 2, 446564785985483547852197647548252246, 8, 8, 32424, 8
Offset: 1

Views

Author

Bill McEachen, Feb 26 2011

Keywords

Comments

Akin to A186283 except for 2^p+1 and restricted to primes.
The larger terms of this sequence occur for the primes p > 3 in sequence A000978. These large terms are (2^p-2)/(3p).
a(n) = 2 iff prime(n) is in A103579. - Robert Israel, Jul 17 2023

Examples

			2^3+1 = 9 has no factor of the form k*3+1 except 1, so a(primepi(3)) = a(2) = 0.
2^29+1 = 536870913 has factor 2*29+1=59, so a(primepi(29)) = a(10) = 2.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,F;
      p:= ithprime(n);
      F:= select(t -> t mod p = 1, numtheory:-divisors(2^p+1) minus {1});
      if F = {} then 0 else (min(F)-1)/p; fi
    end proc:
    map(f, [$1..50]); # Robert Israel, Jul 17 2023
  • Mathematica
    Table[q = First /@ FactorInteger[2^p + 1]; s = Select[q, Mod[#1, p] == 1 &, 1]; If[s == {}, 0, (s[[1]] - 1)/p], {p, Prime[Range[30]]}]
Showing 1-4 of 4 results.