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 11-20 of 20 results.

A089158 Second prime factor, if it exists, of Mersenne numbers.

Original entry on oeis.org

89, 178481, 1103, 616318177, 164511353, 9719, 4513, 69431, 3203431780337, 761838257287, 48544121, 2298041, 202029703, 57912614113275649087721, 13842607235828485645766393, 341117531003194129, 3976656429941438590393
Offset: 1

Views

Author

Cino Hilliard, Dec 06 2003

Keywords

Examples

			The 5th Mersenne number 2^11 - 1 = 23*89 and 89 is the second prime divisor.
The 9th Mersenne number 2^23 - 1 = 47*178481 and 178481 is the second prime divisor.
Notice 23, 89 congruent to 1 mod 11 and 47, 178481 congruent to 1 mod 23.
		

Crossrefs

Programs

  • 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]",")); ) }

A135980 Numbers k such that the Mersenne number 2^prime(k)-1 is composite.

Original entry on oeis.org

5, 9, 10, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78
Offset: 1

Views

Author

Artur Jasinski, Dec 09 2007

Keywords

Comments

A135979 is a subsequence of this sequence.

Crossrefs

Programs

  • Mathematica
    k = {}; Do[If[ ! PrimeQ[2^Prime[n] - 1], AppendTo[k, n]], {n, 1, 40}]; k
    m = PrimePi @ MersennePrimeExponent @ Range[13]; Complement[Range[m[[-1]]], m] (* Amiram Eldar, Mar 12 2020 *)
  • PARI
    isok(k) = !isprime(2^prime(k)-1); \\ Michel Marcus, Mar 12 2020

Formula

prime(a(n)) = A054723(n).
a(n) = pi(A054723(n)).

Extensions

More terms from Amiram Eldar, Mar 12 2020

A145099 a(n) = 1 if the largest proper divisor of Mersenne composite A145097(n) is prime and a(n) = 0 in opposite case.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Artur Jasinski, Oct 01 2008

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[m = 2^Prime[n] - 1; k = Divisors[m][[ -2]]; If[PrimeQ[m], null, If[PrimeQ[k], AppendTo[a, 1], AppendTo[a, 0]]], {n, 1, 50}]; a

Extensions

Name clarified and more terms added by Amiram Eldar, Mar 12 2020

A344515 Primes p such that 2^p-1 has exactly 3 distinct prime factors.

Original entry on oeis.org

29, 43, 47, 53, 71, 73, 79, 179, 193, 211, 257, 277, 283, 311, 331, 349, 353, 389, 409, 443, 467, 499, 563, 577, 599, 613, 631, 643, 647, 683, 709, 751, 769, 829, 919, 941, 1039, 1103, 1117, 1123, 1171, 1193
Offset: 1

Views

Author

Amiram Eldar, May 21 2021

Keywords

Comments

The corresponding Mersenne numbers are in A135977.
a(43) >= 1237.
The following primes are also terms of this sequence: 1301, 1303, 1327, 1459, 1531, 1559, 1907, 2311, 2383, 2887, 3041, 3547, 3833, 4127, 4507, 4871, 6883, 7673, 8233.

Examples

			29 is a term since 2^29-1 = 536870911 = 233 * 1103 * 2089 has exactly 3 distinct prime factors.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200], PrimeQ[#] && PrimeNu[2^# - 1] == 3 &]

Formula

2^a(n) - 1 = A135977(n).

A367229 Fermat pseudoprimes to base 2 that are products of two Mersenne numbers (not necessarily distinct) that are larger than 1.

Original entry on oeis.org

1905, 15841, 129921, 8322945, 66977281, 4395899025409, 4398012825601, 140735340806145, 36892925197465616385, 2342736497361113055105, 4951750712408555360305545217, 39304596247310823728047193985, 2535301191011725837253847547905, 1298074214624262174166747352924161
Offset: 1

Views

Author

Amiram Eldar, Nov 11 2023

Keywords

Comments

Without the restriction to Mersenne numbers that are larger than 1 all the composite Mersenne numbers (A065341) will be terms.
Szymiczek (1964) proved that if p is a prime == 7 (mod 8) (A007522) and t = 2^phi((p-1)/2), then M(p)*M(t) is a Fermat pseudoprime to base 2, where phi is the Euler totient function (A000010) and M(n) = 2^n-1 = A000225(n) is the n-th Mersenne number. The smallest pseudoprime that is generated by this rule, for p = 7 and t = 2^phi((7-1)/2) = 4, is M(7) * M(4) = 1905. The next two, corresponding to p = 23 and 31, have 316 and 87 digits, respectively.
Rotkiewicz and Makowski (1966) proved that if p is a prime or a Fermat pseudoprime to base 2 such that o(p), the multiplicative order of 2 modulo p, is odd (A014663 for primes, A367230 for pseudoprimes), then for each positive k <= p/o(o(p)), if t = 2^(k*o(o(p))) then M(p)*M(t) is a Fermat pseudoprime to base 2. For example, for p = 7, p/o(o(7)) = 7/2, so for k = 1, 2 and 3 the resulting pseudoprimes are 1905, 8322945 and 2342736497361113055105, respectively.

Examples

			a(1) = 1905 = (2^4-1) * (2^7-1).
a(2) = 15841 = (2^5-1) * (2^9-1).
		

Crossrefs

Programs

  • Mathematica
    With[{max = 110}, m = 2^Range[2, max] - 1; Sort@ Select[Times @@@ Subsets[m, {2}], # < m[[-1]] && PowerMod[2, # - 1, #] == 1 &]]

A186645 Numbers k such that 2^(k-1) == 1 + b*k (mod k^2), where b divides k-1.

Original entry on oeis.org

3, 7, 11, 13, 19, 29, 31, 37, 71, 127, 379, 491, 2047, 2633, 2659, 3373, 8191, 13249, 26893, 70687, 74597, 87211, 131071, 184511, 524287, 642581, 1897121, 2676301, 2703739, 8388607, 15456151, 52368101, 102785339, 126233057, 193481677, 536870911, 856645921, 1552107133, 2001907169, 2147483647, 2935442621, 3668158729, 6004262437
Offset: 1

Views

Author

Alzhekeyev Ascar M, Feb 25 2011

Keywords

Comments

All composites in this sequence are 2-pseudoprimes, A001567.
The sequence contains all Mersenne numbers, A001348, k=2^p-1 for primes p (for which b=(k-1)/p). Correspondingly, the composites in this sequence contain all terms of A065341.
The sequence also contains composites of the form 2^A001567(j) - 1, which do not belong to A065341. The existence of composites in the sequence that are not of the form 2^x-1 is unclear.
The sequence contains A125854 as a subsequence.

Crossrefs

Programs

  • Maple
    isA186645 := proc(n)
            if Power(2,n-1) mod n = 1 then
                    x := Power(2,n-1) mod (n^2) ;
                    b := (x-1)/n ;
                    if b>0 then if modp(n-1,b) = 0 then true; else false; end if;
                    else false;
                    end if;
            else
                    false;
            end if;
    end proc:
    for n from 1 do if isA186645(n) then printf("%d,\n",n); end if; end do: # R. J. Mathar, Mar 09 2011

Extensions

Edited and more terms added by Max Alekseyev, Mar 14 2011

A225721 Starting with x = n, the number of iterations of x := 2x - 1 until x is prime, or -1 if no prime exists.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This appears to be a shifted variant of A040076. - R. J. Mathar, May 28 2013
If n is prime, then a(n) = 0. If the sequence never reaches a prime number (for n = 1) or the prime number has more than 1000 digits, -1 is used instead. There are 22 such numbers for n < 10000.

Examples

			For a(20), the trajectory is 20->39->77->153->305->609->1217, a prime number. That required 6 steps, so a(20)=6.
		

Crossrefs

Cf. A050921 (primes obtained).
Cf. A040081, A038699, A050412, A052333, A046069 (related to the Riesel problem).
Cf. A000668, A000043, A065341 (Mersenne primes), A000079 (powers of 2).
Cf. A007770 (happy numbers), A031177 (unhappy numbers).
Cf. A037274 (home primes), A037271 (steps), A037272, A037272.

Programs

  • R
    y=as.bigz(rep(0,500)); ys=rep(0,500);
    for(i in 1:500) { n=as.bigz(i); k=0;
        while(isprime(n)==0 & ndig(n)<1000 & k<5000) { k=k+1; n=2*n-1 }
        if(ndig(n)>=1000 | k>=5000) { ys[i]=-1; y[i]=-1;
        } else {ys[i]=k; y[i]=n; }
    }

A319908 Lesser of twin primes pair p, such that the Mersenne numbers 2^p - 1 and 2^(p+2) - 1 have the same number of prime factors.

Original entry on oeis.org

3, 5, 17, 71, 101, 137, 197, 269, 617, 857, 1019, 1049, 1061
Offset: 1

Views

Author

Amiram Eldar, Oct 01 2018

Keywords

Comments

The corresponding number of prime factors is 1, 1, 1, 3, 2, 2, 2, 2, 4, 4, 5, 4, 2, ...
Assuming that Mersenne numbers (2^p-1 with p prime) are always squarefree, the distinction between number of prime factors with multiplicity (A001222) and number of different prime factors (A001221) is inessential.

Examples

			3 is in the sequence since 3 and 5 are twin primes pair, and 2^3-1=7 and 2^5-1=31 are both primes, thus having the same number of prime factors.
71 is in the sequence since 71 and 73 are twin primes pair and 2^71-1 and 2^73-1 both have 3 prime factors.
		

Crossrefs

Programs

  • Mathematica
    Do[If[PrimeQ[n]&&PrimeQ[n+2]&&PrimeOmega[2^n-1]==PrimeOmega[2^(n+2)-1],Print[n]],{n,1,200}]
  • PARI
    isok(p) = isprime(p) && isprime(p+2) && (omega(2^p-1) == omega(2^(p+2)-1)); \\ Michel Marcus, Oct 02 2018

A346567 Fermat pseudoprimes to base 2 that are palindromic in base 2.

Original entry on oeis.org

341, 561, 645, 1105, 2047, 4369, 4681, 5461, 8481, 16705, 33153, 266305, 278545, 526593, 1052929, 1082401, 1398101, 2113665, 2162721, 2290641, 4259905, 6242685, 7674967, 8388607, 16843009, 17895697, 22369621, 34603041, 67371265, 268505089, 280885153, 285212689
Offset: 1

Views

Author

Amiram Eldar, Jul 23 2021

Keywords

Comments

There are 133 terms below 2^64. Only 4 of them are also Carmichael numbers (561, 1105, 278545 and 67371265).

Examples

			341 is a term since 341 = 101010101_2 is palindromic in base 2, it is composite (= 11 * 31) and 2^340 == 1 (mod 341).
		

Crossrefs

Intersection of A001567 and A006995.
A065341 and A281576 are subsequences.

Programs

  • Mathematica
    pspQ[n_] := CompositeQ[n] && PowerMod[2, n-1, n] == 1; Select[Range[10^6], PalindromeQ[IntegerDigits[#, 2]] && pspQ[#] &]

A236373 Pseudoprimes to base 2 of the form 6p+1 such that 2^(p-1) == 1 (mod p).

Original entry on oeis.org

2047, 8388607, 140737488355327, 576460752303423487
Offset: 1

Views

Author

Alzhekeyev Ascar M, Jan 24 2014

Keywords

Comments

The first four terms are A065341(1), A065341(2), A065341(7), A065341(9) and have the form 2^m-1. Are there terms not of this form?
Composite 2^n-1 belong to this sequence when n is in A005385 (e.g., 2^83-1, 2^167-1, etc.)
No other terms below 2^64. - Max Alekseyev, May 28 2014

Examples

			2047=6*341+1; 2^2046 == 1 (mod 2047); 2^340 == 1 (mod 341).
		

Crossrefs

Subsequence of A001567.

Extensions

a(4) from Max Alekseyev, May 28 2014
Previous Showing 11-20 of 20 results.