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

A126805 "Class-" (or "class-minus") number of prime(n) according to the Erdős-Selfridge classification of primes.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 2, 1, 2, 2, 4, 2, 3, 2, 3, 2, 1, 2, 3, 3, 1, 2, 2, 3, 1, 2, 2, 2, 2, 4, 2, 2, 2, 1, 4, 3, 4, 2, 2, 1, 2, 3, 2, 2, 3, 2, 3, 2, 2, 2, 1, 3, 4, 2, 4, 2, 5, 2, 2, 3, 2, 3, 3, 2, 4, 3, 3, 5, 3, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 1, 2, 2, 2, 2, 4, 3, 4, 3, 1, 2, 4, 3, 3, 2, 3, 2, 2, 5, 3, 3, 2
Offset: 1

Views

Author

R. J. Mathar, Feb 23 2007

Keywords

Comments

This gives the "class-" number as opposed to the "class+" number. Not to be confused with the "class-number" of quadratic form theory.
a(n)=1 if A000040(n) is in A005109, a(n)=2 if A000040(n) is in A005110, a(n)=3 if A000040(n) is in A005111 etc.

Crossrefs

Cf. A056637.

Programs

  • Maple
    A126805 := proc(n)
        option remember;
        local p, pe, a;
        if isprime(n) then
            a := 1;
            for pe in ifactors(n-1)[2] do
                p := op(1, pe);
                if p > 3 then
                    a := max(a, procname(p)+1);
                end if;
            end do;
            a ;
        else
            -1;
        end if;
    end proc:
    seq(A126805(ithprime(n)),n=1..100) ;
  • Mathematica
    a [n_] := a[n] = Module[{p, pf, e, res}, If[PrimeQ[n], pf = FactorInteger[n-1]; res = 1; For[e = 1, e <= Length[pf], e++, p = pf[[e, 1]]; If[p > 3, res = Max[res, a[p]+1]]]; Return[res], -1]]; Table[a[Prime[n]], {n, 1, 105}] (* Jean-François Alcover, Dec 13 2013, translated from Maple *)
  • PARI
    A126805(n) = { if( n>0, n=-prime(n)); if(( n=factor(-1-n)[,1] ) & n[ #n]>3, vecsort( vector( #n, i, A126805(-n[i]) ))[ #n]+1, 1) } \\ M. F. Hasler, Apr 16 2007

Formula

a(n) = max { a(p)+1 ; prime(p) is > 3 and divides prime(n)-1 } union { 1 } - M. F. Hasler, Apr 16 2007

A101231 a(n) = n-th prime of Erdős-Selfridge classification n-.

Original entry on oeis.org

2, 29, 67, 179, 941, 4079, 20389, 65267, 224563, 978863, 6448979, 47247763, 309550999, 2150787839, 13925010299
Offset: 1

Views

Author

Jonathan Vos Post, Dec 15 2004

Keywords

Comments

Diagonalization of the Erdős-Selfridge classification of primes.

Examples

			a(1) = 2 because 2 is the first element of A005109.
a(2) = 29 because 29 is the 2nd element of A005110.
a(3) = 67 because 67 is the 3rd element of A005111.
a(4) = 179 because 179 is the 4th element of A005112.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, A18.

Crossrefs

Extensions

More terms from R. J. Mathar, May 02 2007
Previous Showing 11-12 of 12 results.