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

A059912 Triangle T(n,k) of orders of n degree irreducible polynomials over GF(2) listed in ascending order, k=1..A059499(n).

Original entry on oeis.org

1, 3, 7, 5, 15, 31, 9, 21, 63, 127, 17, 51, 85, 255, 73, 511, 11, 33, 93, 341, 1023, 23, 89, 2047, 13, 35, 39, 45, 65, 91, 105, 117, 195, 273, 315, 455, 585, 819, 1365, 4095, 8191, 43, 129, 381, 5461, 16383, 151, 217, 1057, 4681, 32767, 257, 771, 1285, 3855
Offset: 1

Views

Author

Vladeta Jovovic, Feb 09 2001

Keywords

Comments

A permutation of the odd positive numbers; namely, order each odd number d by the multiplicative order of 2 modulo d (in case of a tie, smaller d go first). - Jeppe Stig Nielsen, Feb 13 2020

Examples

			There are 18 (cf. A001037) irreducible polynomials of degree 7 over GF(2) which all have order 127.
Triangle T(n,k) begins:
    1;
    3;
    7;
    5,   15;
   31;
    9,   21,  63;
  127;
   17,   51,  85, 255;
   73,  511;
   11,   33,  93, 341, 1023;
  ...
		

Crossrefs

Column k=1 of A212737.
Column k=1 gives: A212953.
Last elements of rows give: A000225.
Cf. A108974.

Programs

  • Maple
    with(numtheory):
    M:= proc(n) option remember;
          divisors(2^n-1) minus U(n-1)
        end:
    U:= proc(n) option remember;
          `if`(n=0, {}, M(n) union U(n-1))
        end:
    T:= n-> sort([M(n)[]])[]:
    seq(T(n), n=1..20);  # Alois P. Heinz, May 31 2012
  • Mathematica
    m[n_] := m[n] = Complement[ Divisors[2^n - 1], u[n - 1]]; u[0] = {}; u[n_] := u[n] = Union[ m[n], u[n - 1]]; t[n_, k_] := m[n][[k]]; Flatten[ Table[t[n, k], {n, 1, 16}, {k, 1, Length[ m[n] ]}]] (* Jean-François Alcover, Jun 14 2012, after Alois P. Heinz *)
  • PARI
    maxDegree=26;for(n=1,maxDegree,forstep(d=1,2^n,2,znorder(Mod(2,d))==n&&print1(d,", "))) \\ inefficient, Jeppe Stig Nielsen, Feb 13 2020

Formula

T(n,k) = k-th smallest element of M(n) = {d : d|(2^n-1)} \ U(n-1) with U(n) = M(n) union U(n-1) if n>0, U(0) = {}. - Alois P. Heinz, Jun 01 2012

A129733 List of primitive prime divisors of the numbers (3^k-1)/2 (A003462) for k>=2, in order of their occurrence.

Original entry on oeis.org

2, 13, 5, 11, 7, 1093, 41, 757, 61, 23, 3851, 73, 797161, 547, 4561, 17, 193, 1871, 34511, 19, 37, 1597, 363889, 1181, 368089, 67, 661, 47, 1001523179, 6481, 8951, 391151, 398581, 109, 433, 8209, 29, 16493, 59, 28537, 20381027, 31, 271, 683
Offset: 1

Views

Author

N. J. A. Sloane, May 13 2007

Keywords

Comments

Read A003462 term-by-term, factorize each term, write down any primes not seen before.
Except for k=1, there is at least one primitive prime divisor for every k. - T. D. Noe, Mar 01 2010

Crossrefs

If 3 is replaced with 2, we get A000225, A000043, A108974 respectively.

Programs

  • Maple
    # produce sequence
    s1:=(a,b,M)->[seq( (a^n-b^n)/(a-b),n=0..M)];
    # find primes and their indices
    s2:=proc(s) local t1,t2,i; t1:=[]; t2:=[];
    for i from 1 to nops(s) do if isprime(s[i]) then
    t1:=[op(t1),s[i]];
    t2:=[op(t2),i-1]; fi; od; RETURN(t1,t2); end;
    # get primitive prime divisors in order
    s3:=proc(s) local t2,t3,i,j,k,np; t2:=[]; np:=0;
    for i from 1 to nops(s) do t3:=ifactors(s[i])[2];
    for j from 1 to nops(t3) do p := t3[j][1]; new:=1;
    for k from 1 to np do if p = t2[k] then new:= -1; break; fi; od;
    if new = 1 then np:=np+1; t2:=[op(t2),p]; fi; od; od;
    RETURN(t2); end;

A129734 List of primitive prime divisors of the numbers 3^n-2^n (A001047) in their order of occurrence.

Original entry on oeis.org

5, 19, 13, 211, 7, 29, 71, 97, 1009, 11, 23, 331, 61, 53, 29927, 463, 3571, 17, 401, 129009091, 577, 1559, 745181, 4621, 43, 6217, 35839, 47, 2002867877, 5521, 101, 39756701, 79, 4057, 397760329, 369181, 68629840493971, 31, 241, 617671248800299, 3041, 14177
Offset: 1

Views

Author

N. J. A. Sloane, May 13 2007

Keywords

Comments

Read A001047 term-by-term, factorize each term, write down any primes not seen before.

Crossrefs

Extensions

a(41) and a(42) switched by Amiram Eldar, Jun 30 2023

A158895 A list of primes written in order of their first appearance in a table of prime factorizations of 2^k+1, k=1,2,... .

Original entry on oeis.org

3, 5, 17, 11, 13, 43, 257, 19, 41, 683, 241, 2731, 29, 113, 331, 65537, 43691, 37, 109, 174763, 61681, 5419, 397, 2113, 2796203, 97, 673, 251, 4051, 53, 157, 1613, 87211, 15790321, 59, 3033169, 61, 1321, 715827883
Offset: 1

Views

Author

Martin Griffiths, Mar 29 2009

Keywords

Comments

This sequence has the property that if a(n) appears first in the table as a prime factor of 2^m+1 for some m then a(n)=2*k*m+1 for some k.
When, for some m, 2^m+1 has more than one prime factor appearing in the table for the first time, we adopt the convention of entering them in ascending order. For example, the entries ..., 29, 113, ... both arise from 2^14+1.

Examples

			2^1+1=3, 2^2+1=5, 2^3+1=3^2 and 2^4+1=17. Thus a(1)=3, a(2)=5 and a(3)=17, on noting that 2^3+1 contributes no new prime factors.
		

Crossrefs

Subsequence of A001269.

Programs

  • Mathematica
    DeleteDuplicates[Flatten[Table[Transpose[FactorInteger[2^k+1]][[1]],{k,50}]]] (* Harvey P. Dale, Mar 30 2014 *)
  • PARI
    lista(n)=prs = Set(); for (k=1, n, f = factor(2^k+1); for (i=1, length(f~), onef = f[i,1]; if (! setsearch(prs, onef), print1(onef, ", "); prs = setunion(prs, Set(onef));););); \\ Michel Marcus, Apr 18 2013
    
  • PARI
    G=1; for(n=1,500, g=gcd(f=2^n+1,G); while(g>1, g=gcd(g,f/=g)); f=factor(f)[,1]; if(#f, for(i=1,#f, print1(f[i]", ")); G*=factorback(f))) \\ Charles R Greathouse IV, Jan 03 2018

A283461 Second-largest prime factor of 2^n - 1, if composite, or 1 otherwise.

Original entry on oeis.org

1, 1, 3, 1, 3, 1, 5, 7, 11, 23, 7, 1, 43, 31, 17, 1, 19, 1, 31, 127, 89, 47, 17, 601, 2731, 73, 113, 1103, 151, 1, 257, 89, 43691, 127, 73, 223, 174763, 8191, 41, 13367, 337, 9719, 683, 631, 178481, 4513, 257, 127, 1801, 11119, 2731
Offset: 2

Views

Author

Keywords

Comments

For clarification: if the largest prime factor occurs more than once, then that prime factor is selected.

Crossrefs

Programs

  • Mathematica
    a[n_] := If[PrimeQ[2^n-1], 1, Block[{f = FactorInteger[2^n-1]}, If[f[[-1, 2]] == 1, f[[-2, 1]], f[[-1, 1]]]]]; a /@ Range[2, 52] (* Giovanni Resta, Mar 08 2017 *)
  • PARI
    a(n)=my(f=factor(2^n-1),t=#f~); if(f[t,2]>1, f[t,1], if(t>1, f[t-1,1], 1))

Formula

a(n) = A006530(A000225(n)/A005420(n)).
Showing 1-5 of 5 results.