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 33 results. Next

A086251 Number of primitive prime factors of 2^n - 1.

Original entry on oeis.org

0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 3, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 2, 1, 2, 3, 3, 3, 1, 3, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 3, 1, 2, 3, 2, 3, 2, 2, 3, 1, 1, 3, 1, 3, 2, 2, 2, 1, 1, 2, 2, 1, 1, 3, 4, 1, 2, 3, 2, 2, 1, 3, 3, 2, 3, 2, 2, 3
Offset: 1

Views

Author

T. D. Noe, Jul 14 2003

Keywords

Comments

A prime factor of 2^n - 1 is called primitive if it does not divide 2^r - 1 for any r < n. Equivalently, p is a primitive prime factor of 2^n - 1 if ord(2,p) = n. Zsigmondy's theorem says that there is at least one primitive prime factor for n > 1, except for n=6. See A086252 for those n that have a record number of primitive prime factors.
Number of odd primes p such that A002326((p-1)/2) = n. Number of occurrences of number n in A014664. - Thomas Ordowski, Sep 12 2017
The prime factors are not counted with multiplicity, which matters for a(364)=4 and a(1755)=6. - Jeppe Stig Nielsen, Sep 01 2020

Examples

			a(11) = 2 because 2^11 - 1 = 23*89 and both 23 and 89 have order 11.
		

Crossrefs

Cf. A046800, A046051 (number of prime factors, with repetition, of 2^n-1), A086252, A002588, A005420, A002184, A046801, A049093, A049094, A059499, A085021, A097406, A112927, A237043.

Programs

  • Mathematica
    Join[{0}, Table[cnt=0; f=Transpose[FactorInteger[2^n-1]][[1]]; Do[If[MultiplicativeOrder[2, f[[i]]]==n, cnt++ ], {i, Length[f]}]; cnt, {n, 2, 200}]]
  • PARI
    a(n) = sumdiv(n, d, moebius(n/d)*omega(2^d-1)); \\ Michel Marcus, Sep 12 2017
    
  • PARI
    a(n) = my(m=polcyclo(n, 2)); omega(m/gcd(m,n)) \\ Jeppe Stig Nielsen, Sep 01 2020

Formula

a(n) = Sum{d|n} mu(n/d) A046800(d), inverse Mobius transform of A046800.
a(n) <= A182590(n). - Thomas Ordowski, Sep 14 2017
a(n) = A001221(A064078(n)). - Thomas Ordowski, Oct 26 2017

Extensions

Terms to a(500) in b-file from T. D. Noe, Nov 11 2010
Terms a(501)-a(1200) in b-file from Charles R Greathouse IV, Sep 14 2017
Terms a(1201)-a(1206) in b-file from Max Alekseyev, Sep 11 2022

A274908 Largest prime factor of 8^n - 1.

Original entry on oeis.org

7, 7, 73, 13, 151, 73, 337, 241, 262657, 331, 599479, 109, 121369, 5419, 23311, 673, 131071, 262657, 1212847, 1321, 649657, 599479, 10052678938039, 38737, 10567201, 22366891, 97685839, 14449, 9857737155463, 18837001, 658812288653553079, 22253377
Offset: 1

Views

Author

Vincenzo Librandi, Jul 11 2016

Keywords

Examples

			8^5 -1 = 32767 = 7*31*151, so a(5) = 151.
		

Crossrefs

Cf. similar sequences listed in A274906.

Programs

  • Magma
    [Maximum(PrimeDivisors(8^n-1)): n in [1..40]];
  • Maple
    f:= n -> max(map(t -> max(numtheory:-factorset(subs(x=2,t[1]))), factors(x^(3*n)-1)[2])):
    map(f, [$1..120]); # Robert Israel, Jul 12 2016
  • Mathematica
    Table[FactorInteger[8^n - 1][[-1, 1]], {n, 40}]

Formula

a(n) = A006530(A024088(n)). - Michel Marcus, Jul 11 2016
a(n) = A005420(3*n). - Robert Israel, Jul 12 2016

Extensions

Terms to a(100) in b-file from Vincenzo Librandi, Jul 13 2016
a(101)-a(402) in b-file from Amiram Eldar, Feb 02 2020
a(403)-a(500) in b-file from Max Alekseyev, Apr 25 2022, Sep 11 2022, Dec 05 2022, Feb 25 2023

A063670 Positions of nonzero coefficients in cyclotomic polynomial Phi_n(x), converted from binary to decimal.

Original entry on oeis.org

2, 3, 3, 7, 5, 31, 7, 127, 17, 73, 31, 2047, 21, 8191, 127, 443, 257, 131071, 73, 524287, 341, 7003, 2047, 8388607, 273, 1082401, 8191, 262657, 5461, 536870911, 443, 2147483647, 65537, 1797851, 131071, 26181091, 4161, 137438953471, 524287
Offset: 0

Views

Author

Antti Karttunen, Aug 03 2001

Keywords

Comments

a(n) = 2^n-1 whenever n is prime. It seems as if a(n) >= A005420(n) for all n (checked up to 200), with equality for all 1A005420(n)=2^n-1 (i.e., 2^n-1 is prime). - M. F. Hasler, Apr 30 2007
a(0) could also be 1. - T. D. Noe, Oct 29 2007

Crossrefs

Cf. A013594.
a(n) = A063696(n) (the positive terms) + A063698(n) (the negative terms).
This sequence in binary: A063671.
Cf. A005420.

Programs

  • Maple
    [seq(Phi_pos_terms(j,2)+Phi_neg_terms(j,2),j=0..104)];
  • Mathematica
    a[n_] := FromDigits[ If[# != 0, 1, 0]& /@ CoefficientList[ Cyclotomic[n, x], x], 2]; a[0] = 2; Table[a[n], {n, 0, 38}] (* Jean-François Alcover, Dec 11 2012 *)
  • PARI
    A063670(n)=local(p=polcyclo(n+!n)); if(n,sum(i=0, n, (polcoeff(p, i)<>0)<M. F. Hasler, Apr 30 2007
    
  • PARI
    a(n) = subst(apply(x->x!=0, polcyclo(n,'x)), 'x, 2);  \\ Gheorghe Coserea, Nov 04 2016

A366718 Largest prime factor of 12^n - 1.

Original entry on oeis.org

11, 13, 157, 29, 22621, 157, 4943, 233, 80749, 22621, 266981089, 20593, 20369233, 13063, 22621, 260753, 74876782031, 80749, 29043636306420266077, 85403261, 8177824843189, 57154490053, 321218438243, 2227777, 12629757106815551, 20369233, 86769286104133
Offset: 1

Views

Author

Sean A. Irvine, Oct 17 2023

Keywords

Crossrefs

Programs

  • Magma
    [Maximum(PrimeDivisors(12^n-1)): n in [1..40]];
  • Mathematica
    Table[FactorInteger[12^n - 1][[-1, 1]], {n, 40}]

Formula

a(n) = A006530(A024140(n)).

A367003 a(n) is the largest prime factor of n*2^n-1.

Original entry on oeis.org

1, 7, 23, 7, 53, 383, 179, 89, 271, 3413, 2503, 2137, 59, 367, 1433, 41, 15803, 59729, 26423, 11161, 1559, 12611, 9187523, 127867, 119837257, 11527, 2360833, 43969, 2339, 32212254719, 257503, 616318177, 260587, 127873, 682902239, 44939, 69660839431, 1185617
Offset: 1

Views

Author

Sean A. Irvine, Oct 31 2023

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := FactorInteger[n*2^n - 1][[-1, 1]]; Array[a, 40] (* Amiram Eldar, Oct 29 2024 *)

Formula

a(n) = A006530(A003261(n)).

A002588 a(n) = largest noncomposite factor of 2^(2n+1) - 1.

Original entry on oeis.org

1, 7, 31, 127, 73, 89, 8191, 151, 131071, 524287, 337, 178481, 1801, 262657, 2089, 2147483647, 599479, 122921, 616318177, 121369, 164511353, 2099863, 23311, 13264529, 4432676798593, 131071, 20394401, 201961, 1212847, 3203431780337
Offset: 0

Views

Author

Keywords

Comments

a(n) is also the largest noncomposite factor of A147590(n). - César Aguilera, Jul 31 2019

References

  • J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 2, p. 84.
  • 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).

Crossrefs

Programs

  • Magma
    [1] cat [Maximum(PrimeDivisors(2^(2*n+1) - 1)): n in [1..60]]; // Vincenzo Librandi, Aug 02 2019
  • Mathematica
    Table[FactorInteger[2^(2 n + 1) - 1] [[-1, 1]], {n, 0, 30}] (* Vincenzo Librandi, Aug 02 2019 *)
  • PARI
    a(n) = if (n==0, 1, vecmax(factor(2^(2*n+1) - 1)[, 1])); \\ Michel Marcus, Aug 03 2019
    

Extensions

More terms from Don Reble, Nov 14 2006

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

A336719 Largest odd prime p for which the order of 2 mod p is at most n.

Original entry on oeis.org

3, 7, 7, 31, 31, 127, 127, 127, 127, 127, 127, 8191, 8191, 8191, 8191, 131071, 131071, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
Offset: 2

Views

Author

Jeppe Stig Nielsen, Aug 01 2020

Keywords

Comments

a(1) is undefined.
Changing "at most n" to "equal to n" in the definition gives A097406.
The first term that is not a Mersenne prime (A000668) is 4432676798593.
For a version without duplicates, see A336720. For a list of all n where a(n) increases, see A336721.

Crossrefs

Programs

  • PARI
    re=0;for(n=2,+oo,p=vecmax(factor(2^n-1)[,1]);p>re&&re=p;print1(re,", "))

A367005 a(n) is the largest prime factor of n*2^n+1 for n>0, and a(0)=1.

Original entry on oeis.org

1, 3, 3, 5, 13, 23, 11, 23, 683, 419, 19, 1733, 199, 11833, 487, 997, 61681, 4691, 211, 5279, 7541, 1914791, 7177, 607, 5233, 6689, 2373919, 336823, 8937209, 6051013, 409, 11681, 25781083, 6031230671, 18803, 32502455213, 934861, 339016085231, 55586743
Offset: 0

Views

Author

Sean A. Irvine, Oct 31 2023

Keywords

Crossrefs

Programs

Formula

a(n) = A006530(A002064(n)).

Extensions

Name edited by Michel Marcus, Nov 10 2023

A249780 Product of lowest and highest prime factors of 2^n-1.

Original entry on oeis.org

9, 49, 15, 961, 21, 16129, 51, 511, 93, 2047, 39, 67092481, 381, 1057, 771, 17179607041, 219, 274876858369, 123, 2359, 2049, 8388607, 723, 55831, 24573, 1838599, 381, 486737, 993, 4611686014132420609, 196611, 4196353, 393213, 3810551, 327, 137438953471, 1572861, 849583, 185043
Offset: 2

Views

Author

Jacob Vecht, Nov 05 2014

Keywords

Examples

			The lowest and higest prime factors of 2^6-1 are 3 and 7, so A(6) = 21
		

Programs

  • Maple
    a:= proc(n) local F; F:= numtheory:-factorset(2^n-1); min(F)*max(F) end proc:
    seq(a(n),n=2..50); # Robert Israel, Nov 05 2014
  • Mathematica
    plhpf[n_]:=Module[{fn=FactorInteger[n]},fn[[1,1]]fn[[-1,1]]]; Table[plhpf [2^n-1],{n,2,40}] (* Harvey P. Dale, May 23 2020 *)
  • PARI
    for(n=2, 50, p=2^n-1; print1(factor(p)[1, 1]*factor(p)[#factor(p)[, 1], 1], ", ")) \\ Derek Orr, Nov 05 2014
    
  • Python
    from sympy import primefactors
    A249780_list, x = [], 1
    for n in range(2,10):
        x = 2*x + 1
        p = primefactors(x)
        A249780_list.append(max(p)*min(p)) # Chai Wah Wu, Nov 05 2014

Formula

a(n) = A005420(n) * A049479(n)

Extensions

More terms from Derek Orr, Nov 05 2014
Previous Showing 11-20 of 33 results. Next