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 31-35 of 35 results.

A297294 Number of primitive Pythagorean triples (PPTs) that have 2^n-1 as the length of their odd leg where n is the sequence index.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 4, 2, 4, 2, 8, 1, 4, 4, 8, 1, 8, 1, 16, 4, 8, 2, 32, 4, 4, 4, 32, 4, 32, 1, 16, 8, 4, 8, 128, 2, 4, 8, 64, 2, 32, 4, 64, 32, 8, 4, 256, 2, 64, 16, 64, 4, 32, 32, 128, 8, 32, 2, 1024, 1, 4, 32, 64, 4, 128, 2, 64, 8, 256, 4, 2048, 4, 16, 64, 64, 8, 64, 4, 256, 32, 16, 2, 2048, 4, 16, 32, 512, 1, 1024
Offset: 1

Views

Author

Frank M Jackson, Jan 04 2018

Keywords

Comments

2^n-1 for n = 0 and 1 give the Mersenne numbers 0 and 1, neither of which can be the side length of a PPT. For n > 1, all Mersenne numbers are congruent to 3 mod 4. Consequently, no Mersenne number can be the length of the hypotenuse of a PPT.
If 2^n-1 is the length of the odd leg of a PPT its divisors can provide a set of pairs {x, y} such that for each pair, x*y = 2^n-1, x < y and gcd(x, y) = 1. Using Euclid's parametric generators for PPTs (s^2+t^2, 2s*t, s^2-t^2) with s > t > 0 as positive integers, gcd(s, t) = 1 and s+t odd it is possible to generate all PPTs with 2^n-1 as the length of the odd leg providing that s = (x+y)/2 and t = (y-x)/2.
If 2^n-1 has d distinct prime factors (A046800(n)), then the set of pairs {x, y} such that x*y = 2^n-1, x < y and gcd(x, y) = 1 has a cardinality of 2^(d-1). This is because an integer m consisting of d distinct factors will have 2^d divisors and will generate pairs {x', y'} such that x'*y' = m, x' < y' and gcd(x', y') = 1 with a cardinality of 2^(d-1). Let m be the product of the distinct factor of 2^n-1 and r be the remainder consisting of the remaining repeated prime factors where m*r = 2^n-1. Then there has to be a 1 to 1 correspondence between the set of pairs {x', y'} created from the distinct prime factors of 2^n-1 and {x, y} created from all the prime factors of 2^n-1 whenever the repeated prime factors of r are combined with the distinct factors of m in the pairs {x, y} in order to preserve gcd(x, y) = 1.

Examples

			a(6)=2, because 2^6-1 = 63 gives pairs {1, 63}, {3, 21}, {7, 9} whose members when multiplied give 63. However, only two of these pairs are coprime and will generate PPTs.
		

Crossrefs

Programs

  • Mathematica
    pairs[n_] := Module[{m=2^n-1, lst=Divisors[2^n-1]}, Table[{lst[[l]], m/lst[[l]]}, {l, 1, Length[lst]/2}]]; Table[Length@Select[pairs[n], GCD@@#==1 &], {n, 1, 100}]
    a[n_] := If[n==1, 0, 2^(Length@FactorInteger[2^n-1]-1)]; Array[a, 100]

Formula

For n=1, a(n)=0 otherwise a(n)=2^(A046800(n)-1).

A336104 Number of permutations of the prime indices of A000225(n) = 2^n - 1 with at least one non-singleton run.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 96, 0, 120, 6, 0, 0, 720, 0, 0, 0, 0, 0, 720, 0, 0, 0, 0, 0, 322560, 0, 0, 0, 5040, 0, 4320, 0, 0, 0, 0, 0, 362880, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Sep 03 2020

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The a(21) = 6 permutations of {4, 4, 31, 68}:
  (4,4,31,68)
  (4,4,68,31)
  (31,4,4,68)
  (31,68,4,4)
  (68,4,4,31)
  (68,31,4,4)
		

Crossrefs

A335432 is the anti-run version.
A335459 is the version for factorial numbers.
A336105 counts all permutations of this multiset.
A336107 is not restricted to predecessors of powers of 2.
A003242 counts anti-run compositions.
A005649 counts anti-run patterns.
A008480 counts permutations of prime indices.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A333489 ranks anti-run compositions.
A335433 lists numbers whose prime indices have an anti-run permutation.
A335448 lists numbers whose prime indices have no anti-run permutation.
A335452 counts anti-run permutations of prime indices.
A335489 counts strict permutations of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[Permutations[primeMS[2^n-1]],MatchQ[#,{_,x_,x_,_}]&]],{n,30}]

Formula

a(n) = A336107(2^n - 1).
a(n) = A336105(n) - A335432(n).

A336105 Number of permutations of the prime indices of 2^n - 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 6, 2, 6, 2, 60, 1, 6, 6, 24, 1, 120, 1, 360, 12, 24, 2, 2520, 6, 6, 6, 720, 6, 2520, 1, 120, 24, 6, 24, 604800, 2, 6, 24, 20160, 2, 10080, 6, 5040, 720, 24, 6, 1814400, 2, 5040, 120, 5040, 6, 15120, 720, 40320, 24, 720, 2
Offset: 1

Views

Author

Gus Wiseman, Sep 03 2020

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The a(n) permutations for n = 2, 4, 6, 8, 21:
  (2)  (2,3)  (2,2,4)  (2,3,7)  (31,4,4,68)
       (3,2)  (2,4,2)  (2,7,3)  (31,4,68,4)
              (4,2,2)  (3,2,7)  (31,68,4,4)
                       (3,7,2)  (4,31,4,68)
                       (7,2,3)  (4,31,68,4)
                       (7,3,2)  (4,4,31,68)
                                (4,4,68,31)
                                (4,68,31,4)
                                (4,68,4,31)
                                (68,31,4,4)
                                (68,4,31,4)
                                (68,4,4,31)
		

Crossrefs

A008480 is not restricted to predecessors of powers of 2.
A325617 is the version for factorial numbers.
A335489 counts strict permutations of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Permutations[primeMS[2^n-1]]],{n,30}]

Formula

a(n) = A008480(2^n - 1).
a(n) = A336104(n) + A335432(n).

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

A283455 Numbers m such that 2^m - 1 has at most 2 distinct prime factors.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 17, 19, 23, 31, 37, 41, 49, 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
Offset: 1

Views

Author

Vladimir Shevelev, Mar 08 2017

Keywords

Comments

The sequence differs from A283364 beginning with a(15). All a(n) > 6 are primes or squares of primes.
As in A283364 one can prove that all a(n) > 6 are odd. It is clear that a(n) is either prime or semiprime. Let us show that in the latter case it is the square of a prime. Indeed, let a(n) = p*q, p < q. Then 2^a(n)-1 is divisible by 2^p-1 < 2^q-1. Thus both of them are Mersenne primes.
Let us show that 2^(p*q)-1 differs from (2^p-1)^u*(2^q-1)^v, u,v >= 1. Indeed the equality is possible only in the case p*u + q*v = p*q. Then p|v and q|u. Let u = q*a, v = p*b. Then a + b = 1, which is impossible for u,v >= 1. Hence, 2^(p*q)-1 has a third prime divisor and p*q is not a member.
Are there terms other than 4, 9 and 49 that are squares of primes? Note that, for prime p, 2^(p^2)-1 differs from (2^p-1)^p, so if p^2 is a term, then for a Mersenne prime 2^p-1 and some t >= 1, the number (2^(p^2)-1)/(2^p-1)^t should be a prime or a power of a prime.
Numbers n such that A046800(n) < 3. - Michel Marcus, Mar 08 2017

Crossrefs

Union of {1}, A000043, A085724.

Programs

Extensions

More terms from Peter J. C. Moses, Mar 08 2017
a(48)-a(50) from Charles R Greathouse IV, Mar 08 2017
a(51)-a(57) from Amiram Eldar, Feb 13 2020
Previous Showing 31-35 of 35 results.