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 71-80 of 125 results. Next

A350702 Primes p such that 14*p + 1 divides 2^p - 1.

Original entry on oeis.org

929, 1433, 2393, 2609, 2657, 4373, 4793, 6029, 7529, 10133, 10433, 10949, 10973, 13049, 13109, 16829, 18869, 20873, 22349, 23417, 24137, 26717, 27737, 27893, 28433, 28517, 30977, 33809, 33857, 37217, 38189, 38237, 39209, 39749, 41453, 41813, 42569, 43313, 43613
Offset: 1

Views

Author

Karl-Heinz Hofmann, Jan 27 2022

Keywords

Comments

Known divisors of Mersenne(p) (2^p-1 or Mp for short) are of the form 2*k*p+1. See crossrefs for other k's. If k == 2 (mod 4), there are no such divisors in general. Here k is 14/2 = 7.

Examples

			See LINKS for example of a(13).
		

Crossrefs

Cf. A002515 (k = 1), A188130 (k = 3), A122095 (k = 4), A188133 (k = 5).

Programs

  • Mathematica
    Select[Range[45000], PrimeQ[#] && PowerMod[2, #, 14*# + 1] == 1 &] (* Amiram Eldar, Jan 27 2022 *)
  • PARI
    forprime(p=1, 1e6, if (Mod(2, p*14+1)^p==1, print1(p,", ")))
    
  • Python
    from sympy import sieve
    print([p for p in sieve[1:1000000] if pow(2, p, 14*p+1) == 1])

Formula

{p = A000040(i): 14*p+1 | A001348(i)}.

A037577 Base 5 digits are, in order, the first n terms of the periodic sequence with initial period 1,3.

Original entry on oeis.org

1, 8, 41, 208, 1041, 5208, 26041, 130208, 651041, 3255208, 16276041, 81380208, 406901041, 2034505208, 10172526041, 50862630208, 254313151041, 1271565755208, 6357828776041, 31789143880208, 158945719401041, 794728597005208
Offset: 1

Views

Author

Keywords

Comments

This is a particular case of the generalized sequence a(n)=((A^n) - B)/(A-B). Sometimes the primes of this form are of interest, see A001348, A014224, A028491. - Ctibor O. Zizka, Apr 15 2008

Examples

			a(1) = (5-1)/3 = 1, a(2) = (5^2-1)/3 = 8. - _Philippe Deléham_, Nov 15 2013
		

Programs

  • Mathematica
    CoefficientList[Series[(3 x + 1)/((x - 1) (x + 1) (5 x - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Oct 21 2013 *)

Formula

a(n) = (5^n - 2)/3 for n odd ; a(n) = (5^n - 1)/3 for n even. - Ctibor O. Zizka, Apr 15 2008
a(n) = floor(5^n/3). - Gary Detlefs, Sep 06 2010
a(n) = 5*a(n-1) + a(n-2) - 5*a(n-3). - Charles R Greathouse IV, Jan 15 2011
G.f.: x*(3*x+1) / ((x-1)*(x+1)*(5*x-1)). - Colin Barker, Dec 27 2012

Extensions

First formula corrected by Philippe Deléham, Nov 14 2013

A053159 Numbers n such that n+cototient(n) is a power of 2.

Original entry on oeis.org

1, 3, 7, 10, 20, 31, 40, 80, 127, 160, 320, 322, 640, 644, 1280, 1288, 2560, 2576, 5120, 5152, 8191, 10240, 10304, 20480, 20608, 40960, 41216, 81920, 82432, 131071, 163840, 164864, 327680, 329728, 333634, 524287, 655360, 659456, 667268, 1310720, 1318912
Offset: 1

Views

Author

Labos Elemer, Feb 29 2000

Keywords

Comments

See especially A053579 and also A053576, A053577.

Examples

			Mersenne primes are a proper subset of this sequence: A(M)=2M-M+1=M+1=2^p
		

Crossrefs

Programs

  • PARI
    print(1); for(n=3, 10^9, if(omega(2*n-eulerphi(n))==1, print(n))) /* Donovan Johnson, Apr 04 2013 */

Formula

a(n)+A051953(n) = 2*a(n)-A000010(n) = 2^w for some w.

Extensions

More terms from Reiner Martin, Dec 24 2001

A056743 a(n) = phi(2^prime(n) - 1)/prime(n); a(0) = 0 by convention.

Original entry on oeis.org

0, 1, 2, 6, 18, 176, 630, 7710, 27594, 356960, 18407808, 69273666, 3697909056, 53630700752, 204064589160, 2992477516800, 169917983040000, 9770466930024800, 37800705069076950, 2202596295934991760
Offset: 0

Views

Author

Robert G. Wilson v, Aug 14 2000

Keywords

Crossrefs

Programs

  • Maple
    with numtheory; A056743 := proc(n) phi( 2^ithprime(n) - 1 )/ithprime(n); end;
  • Mathematica
    Phi( A001348) / A000040. Table[EulerPhi[(2^Prime[n] - 1)]/Prime[n], {n, 1, 25}]

A089159 If Mersenne numbers have 3 or more factors, then list the third factor.

Original entry on oeis.org

2089, 2099863, 13264529, 20394401, 212885833, 9361973132609, 1113491139767, 65993, 165799, 1654058017289, 110211473, 70084436712553223, 1489459109360039866456940197095433721664951999121, 7648337, 39940132241, 14732265321145317331353282383
Offset: 1

Views

Author

Cino Hilliard, Dec 06 2003, corrected Nov 16 2006

Keywords

Examples

			The 10th Mersenne number 2^29 - 1 = 233*1103*2089 and 2089 is the third prime factor. Notice these factors are congruent to 1 (mod 29).
		

Crossrefs

Programs

  • PARI
    mersenne2(n) = { c=0; forprime(x=2, n, c++; y = 2^x-1; f=ifactor(y); if(length(f)>=3, print1(f[3]","); ) ) }
    ifactor(n) = { local(f,j,k,flist); flist=[]; f=Vec(factor(n)); for(j=1,length(f[1]), for(k = 1,f[2][j],flist = concat(flist,f[1][j]) ); ); return(flist) }

Formula

A Mersenne number (A001348) is a number of the form 2^p - 1 where p is prime.

Extensions

a(16) from Amiram Eldar, Jul 11 2024

A103902 Mersenne primes p such that the Mersenne number M(p) = 2^p - 1 is composite.

Original entry on oeis.org

8191, 131071, 524287, 2147483647
Offset: 1

Views

Author

Jonathan Sondow, Feb 20 2005

Keywords

Comments

Only four terms are known.
The first four Mersenne primes (p=2^q-1 in A000668) are double Mersenne primes, i.e., in A103901. The next four yield a composite M(p) and therefore are in this sequence. The next larger Mersenne prime p = A000668(9) has already 19 digits and is much too large to enable us, as of today, to test the primality of 2^p-1 (which would require over 10^8 gigabytes just to be stored in binary). This explains that only 4 terms are known of this sequence and of A103901; for all the 30+ remaining members of A000668 it is not known whether they belong to A103901 or to this sequence A103902. - M. F. Hasler, Jan 21 2015

Examples

			M(13) = 8191 is a Mersenne prime and M(1891) is composite, so 1891 is a member.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, 3rd ed., Springer-Verlag, NY, 2004, Sec. A3.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 3rd ed., Oxford Univ. Press, 1954, p. 16.
  • P. Ribenboim, The New Book of Prime Number Records, Springer-Verlag, NY, 1996, Chap. 2, Sec. VII.

Crossrefs

Programs

A109472 Cumulative sum of primes p such that 2^p - 1 is a Mersenne prime.

Original entry on oeis.org

2, 5, 10, 17, 30, 47, 66, 97, 158, 247, 354, 481, 1002, 1609, 2888, 5091, 7372, 10589, 14842, 19265, 28954, 38895, 50108, 70045, 91746, 114955, 159452, 245695, 356198, 488247, 704338, 1461177, 2320610, 3578397, 4976666, 7952887, 10974264, 17946857, 31413774, 52409785, 76446368, 102411319, 132813776, 165396433, 202553100, 245196901, 288309510
Offset: 1

Views

Author

Jonathan Vos Post, Aug 28 2005

Keywords

Comments

Prime cumulative sum of primes p such that 2^p - 1 is a Mersenne prime include: a(1) = 2, a(2) = 5, a(4) = 17, a(6) = 47, a(8) = 97, a(14) = 1609, a(18) = 10589. After 1, all such indices x of prime a(x) must be even.

Examples

			a(1) = 2, since 2^2-1 = 3 is a Mersenne prime.
a(2) = 2 + 3 = 5, since 2^3-1 = 7 is a Mersenne prime.
a(3) = 2 + 3 + 5 = 10, since 2^5-1 = 31 is a Mersenne prime.
a(4) = 2 + 3 + 5 + 7 = 17, since 2^7-1 = 127 is a Mersenne prime; 17 itself is prime (in fact a p such that 2^p-1 is a Mersenne prime).
a(18) = 2 + 3 + 5 + 7 + 13 + 17 + 19 + 31 + 61 + 89 + 107 + 127 + 521 + 607 + 1279 + 2203 + 2281 + 3217 = 10589 (which is prime).
		

Crossrefs

Cf. A000043, A000668 for the Mersenne primes, A001348, A046051, A057951-A057958.

Programs

Formula

a(n) = Sum_{i=1..n} A000043(i).

Extensions

a(38)-a(47) from Gord Palameta, Jul 21 2018

A125954 Least number k > 0 such that ((2n+1)^k - 2^k)/(2n-1) is prime.

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 2, 2, 11, 2, 5, 11, 2, 2, 5, 71, 2, 3, 2, 2, 167, 2, 17, 3, 2, 197, 149, 2, 2, 3, 3, 2, 2267, 2, 2, 3, 3, 2, 29, 2, 2531, 167, 2, 7, 3, 3, 2, 61, 2, 2, 11, 2, 2, 157, 2, 5, 7, 7, 149, 3, 5, 2, 379, 2, 41, 3, 2, 2, 3, 79, 11, 3, 2, 2, 97, 3, 2, 3, 3, 2, 1321, 2, 17, 31, 2, 61
Offset: 0

Views

Author

Alexander Adamchuk, Feb 07 2007

Keywords

Comments

All terms are primes.
a(n) = 2 for n = {1,2,4,5,7,8,10,13,14,17,19,20,22,...} = A067076 Numbers n such that 2n+3 is a prime.
a(34),...,a(40) = {2,2,3,3,2,29,2}.
a(42),...,a(80) = {167,2,7,3,3,2,61,2,2,11,2,2,157,2,5,7,7,149,3,5,2,379,2,41,3,2,2,3,79,11,3,2,2,97,3,2,3,3,2}.
a(82),...,a(90) = {2,17,31,2,61,7,2,2,5}.
a(93),...,a(95) = {383,2,2}.
a(97),...,a(100) = {2,2,5,7}.
a(102),...,a(124) = {13,11,2,5,5,17,3,103,2,19,2,2,3,2,31,37,2,2,3,3,7,3,2}.
a(127),...,a(131) = {2,61,31,2,157}.
a(133),...,a(142) = {2,2,7,3,2,13,2,2,7,3}.
a(144),...,a(146) = {173,2,11}.
a(148),...,a(150) = {3,17,107}.
a(n) is currently unknown for n = {33,41,81,91,92,96,101,125,126,132,143,147,...}.

Crossrefs

Cf. A067076.
Cf. A000043 = Primes p such that 2^p - 1 is prime.
Cf. A001348 = Mersenne numbers: 2^p - 1, where p is prime.
Cf. A057468 = numbers n such that 3^n - 2^n is prime.
Cf. A125958 = Least number k > 0 such that (2^k + (2n-1)^k)/(2n+1) is prime.

Programs

  • Mathematica
    Do[k = 1; While[ !PrimeQ[((2n+1)^k - 2^k)/(2n-1)], k++ ]; Print[k], {n, 100}] (* Ryan Propper, Mar 29 2007 *)
    lnk[n_]:=Module[{k=1},While[!PrimeQ[((2n+1)^k-2^k)/(2n-1)],k++];k]; Array[ lnk,90] (* Harvey P. Dale, May 19 2012 *)

Extensions

More terms from Ryan Propper, Mar 29 2007

A128311 Remainder upon division of 2^(n-1)-1 by n.

Original entry on oeis.org

0, 1, 0, 3, 0, 1, 0, 7, 3, 1, 0, 7, 0, 1, 3, 15, 0, 13, 0, 7, 3, 1, 0, 7, 15, 1, 12, 7, 0, 1, 0, 31, 3, 1, 8, 31, 0, 1, 3, 7, 0, 31, 0, 7, 30, 1, 0, 31, 14, 11, 3, 7, 0, 13, 48, 15, 3, 1, 0, 7, 0, 1, 3, 63, 15, 31, 0, 7, 3, 21, 0, 31, 0, 1, 33, 7, 8, 31, 0, 47, 39, 1, 0, 31, 15, 1, 3, 39, 0, 31, 63
Offset: 1

Views

Author

M. F. Hasler, May 04 2007

Keywords

Comments

By Fermat's little theorem, if p > 2 is prime, then 2^(p-1) == 1 (mod p), thus a(p)=0. If a(n)=0, then n may be only pseudoprime, as for n = 341 = 11*31 [F. Sarrus, 1820].
See A001567 for the list of all pseudoprimes to base 2, i.e., composite numbers which have a(n) = 0, also called Sarrus or Poulet numbers. Carmichael numbers A002997 are pseudoprimes to all (coprime) bases b >= 2. - M. F. Hasler, Mar 13 2020

Examples

			a(1)=0 since any integer == 0 (mod 1);
a(2)=1 since 2^1-1 == 1 (mod 2),
a(3)=0 since 3 is a prime > 2,
a(4)=3 since 2^3-1 = 7 == 3 (mod 4);
a(341)=0 since 341=11*31 is a Sarrus number.
		

Crossrefs

Cf. A001348 (Mersenne numbers), A001567 (Sarrus numbers: pseudoprimes to base 2), A002997 (Carmichael numbers), A084653, A001220 (Wieferich primes).

Programs

  • Mathematica
    Table[Mod[2^(n-1)-1,n],{n,100}] (* Harvey P. Dale, Dec 22 2012 *)
  • PARI
    a(n)=(1<<(n-1)-1)%n
    
  • PARI
    apply( {A128311(n)=lift(Mod(2,n)^(n-1)-1)}, [1..99]) \\ Much more efficient when n becomes very large. - M. F. Hasler, Mar 13 2020
    
  • Python
    def A128311(n): return (pow(2,n-1,n)-1)%n # Chai Wah Wu, Jul 06 2022

Formula

a(n) = M(n-1) - n floor( M(n-1)/n ) = M(n-1) - max{ k in nZ | k <= M(n-1) } where M(k)=2^k-1.

A184085 Decimal expansion of product_{p=primes} (1-1/(2^p-1)).

Original entry on oeis.org

5, 4, 8, 3, 0, 0, 8, 3, 1, 2, 8, 2, 0, 9, 8, 4, 0, 7, 6, 7, 7, 6, 4, 0, 4, 9, 1, 5, 2, 2, 6, 7, 3, 1, 5, 4, 4, 9, 7, 0, 1, 9, 9, 4, 6, 1, 0, 0, 1, 8, 5, 0, 9, 9, 4, 5, 1, 3, 7, 3, 8, 5, 9, 2, 8, 5, 7, 9, 7, 7, 4, 2, 6, 6, 3, 7, 4, 1, 6, 2, 1, 7, 2, 4, 5, 4, 9, 6, 4, 3, 0, 1, 2, 2, 2, 6, 9, 3, 1, 9, 6, 3, 2
Offset: 0

Views

Author

R. J. Mathar, Jan 09 2011

Keywords

Examples

			(1-1/3) *(1-1/7) *(1-1/31) *(1-1/127) *(1-1/2047) * ... = 0.5483008312820984076776404...
		

Programs

  • Mathematica
    digits = 103; m0 = 10; dm = 10; f[m_] := f[m] = Product[p = Prime[n]; 1 - 1/(2^p - 1), {n, 1, m}]; f[m0]; f[m = m0 + dm]; While[RealDigits[f[m], 10, digits+2] != RealDigits[f[m - dm], 10, digits+2], m = m + dm]; RealDigits[f[m], 10, digits] // First (* Jean-François Alcover, Oct 14 2014 *)

Formula

Equals product_{p in A000040} (1-1/(2^p-1)) = product_{n>=1} (1-1/A001348(n)).

Extensions

More digits from Jean-François Alcover, Oct 14 2014
Previous Showing 71-80 of 125 results. Next