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.

A126433 Class+ number of prime(n) according to the Erdős-Selfridge classification of primes.

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Mar 23 2007

Keywords

Comments

a(n)=1 if A000040(n) is in A005105. a(n)=2 if A000040(n) is in A005106, a(n)=3 if in A005107 etc. The locations of records are implicit in A005113.

Crossrefs

Cf. A101253.

Programs

  • Maple
    A126433 := proc(n)
        option remember;
        local p, pf, e, a;
        if isprime(n) then
            pf := ifactors(n+1)[2];
            a := 1;
            for e from 1 to nops(pf) do
                p := op(1, op(e, pf));
                if p > 3 then
                    a := max(a, procname(p)+1);
                end if;
            end do;
            a ;
        else
            -1;
        end if;
    end proc:
    seq(A126433(ithprime(n)),n=1..100) ;
    A126433 := n -> if n>0 then A126433(-ithprime(n)) else numtheory[factorset](1-n); if % subset{2,3} then 1 else 1+max(seq(A126433(-i),i=%)) fi fi; map(%,[$1..999]); # M. F. Hasler, Apr 02 2007
  • Mathematica
    classPlus[p_] := classPlus[p] = If[f = FactorInteger[p + 1][[All, 1]]; q = Last[f]; q == 2 || q == 3, 1, Max[classPlus /@ f] + 1]; classPlus /@ Prime /@ Range[105] (* Jean-François Alcover, Jun 24 2013 *)
  • PARI
    A126433(n) = { if( n>0, n=-prime(n)); n=factor(1-n)[,1]; if( n[ #n]>3, vecsort( vector( #n, i, A126433(-n[i]) ))[ #n]+1, 1) }; vector(999,i,A126433(i))

A129470 Primes p such that the largest prime factor of p+1 has Erdős-Selfridge class+ < N-1 if p is of class N+.

Original entry on oeis.org

883, 1747, 2417, 2621, 3181, 3301, 3533, 3571, 3691, 3853, 4027, 4133, 4513, 4783, 4861, 4957, 5303, 5381, 5393, 5563, 5641, 5821, 6067, 6577, 6991, 7177, 7253, 7331, 8059, 8093, 8377, 8731, 8839, 8929, 8969, 9221, 9281, 9397, 9613, 9931
Offset: 1

Views

Author

M. F. Hasler, Apr 16 2007

Keywords

Comments

In practice the class+ of a prime p is most often given by 1 + the class of the largest prime factor of p+1; terms of this sequence are counterexamples to this "rule". Terms of this sequence are at least of class 3+, since primes of class 1+ and 2+ have all prime factors of p+1 of class 1+. Terms a(k) of this sequence are >= -1 + 2*A005113(N-1) * nextprime(A005113(N-1)), where N is the class of a(k).

Examples

			a(3) = 883 = -1 + 2*13*17 is a prime of class 3+ since 13 is of class 2+, but the largest divisor of 883+1 is 17 which is only of class 1+.
		

Crossrefs

Programs

  • PARI
    class(n,s=1)={n=factor(n+s)[,1];if(n[ #n]<=3,1,for(i=2,#n,n[1]=max(class(n[i],s)+1,n[1]));n[1])}; A129470(n=100,p=1,a=[])={ local(f); while( #a 3, f=factor(1+p=nextprime(p+1))[,1]); forstep( i=#f,2,-1, f[i]=class( f[i] ); if( f[i] > f[ #f], a=concat(a,p); /*print(#a," ",p);*/ break))); a}

A083866 Positions of zeros in Per Nørgård's infinity sequence (A004718).

Original entry on oeis.org

0, 5, 10, 17, 20, 27, 34, 40, 45, 54, 65, 68, 75, 80, 85, 90, 99, 105, 108, 119, 130, 136, 141, 150, 160, 165, 170, 177, 180, 187, 198, 210, 216, 221, 238, 257, 260, 267, 272, 277, 282, 291, 297, 300, 311, 320, 325, 330, 337, 340, 347, 354, 360
Offset: 0

Views

Author

Ralf Stephan, May 07 2003

Keywords

Comments

First differences seem to be always >2.
Many (but not all) prime members are in A005107.
The composer Per Nørgård's name is also written in the OEIS as Per Noergaard.

Crossrefs

Programs

  • Haskell
    a083866 n = a083866_list !! n
    a083866_list = filter ((== 0) . a004718) [0..]
    -- Reinhard Zumkeller, Mar 19 2015, Nov 10 2012
    
  • Python
    from itertools import groupby, islice
    def A083866_gen(startvalue=0): # generator of terms >= startvalue
        n, c = max(0,startvalue),0
        for k, g in groupby(bin(n)[2:]):
            c = c+len(list(g)) if k == '1' else (-c if len(list(g))&1 else c)
        while True:
            if c == 0: yield n
            n += 1
            c = c-t-1 if (t:=(~n & n-1).bit_length())&1 else t+1-c
    A083866_list = list(islice(A083866_gen(),20)) # Chai Wah Wu, Mar 02 2023

A129471 Primes p of Erdos-Selfridge class 3+ with largest prime factor of p+1 not of class 2+.

Original entry on oeis.org

883, 1747, 2417, 2621, 3301, 3533, 3571, 3691, 3853, 4027, 4133, 4783, 4861, 5303, 5381, 5393, 5563, 5641, 5821, 6577, 6991, 7253, 7331, 8059, 8093, 8377, 8839, 8929, 8969, 9221, 9281, 9613, 9931, 10069, 10477, 10487, 10601, 10607, 10903, 11491
Offset: 1

Views

Author

M. F. Hasler, Apr 17 2007

Keywords

Comments

Examples

			a(1) = 883 = -1+2*13*17 is a prime of class 3+ since 13 is of class 2+, but the largest divisor of 883+1 is 17 which is only of class 1+.
		

Crossrefs

Programs

  • PARI
    class(n,s=1)={n=factor(n+s)[,1];if(n[ #n]<=3,1,for(i=2,#n,n[1]=max(class(n[i],s)+1,n[1]));n[1])}; A129471(n=100,p=1,a=[])={ local(f); while( #a 3 & 2 > class(f[ #f]), f=factor(1+p=nextprime(p+1))[,1]); forstep( i=#f-1,2,-1, if( 3 < f[1] = max( f[1],1+class( f[i] )), next(2))); if( f[1] == 3, a=concat(a,p); /*print(#a," ",p)*/)); a}

A129477 Primes p of Erdos-Selfridge class 6+ with largest prime factor of p+1 not of class 5+.

Original entry on oeis.org

2146141, 2182897, 2954773, 3199813, 3224317, 3285577, 3383593, 3505933, 3555121, 3567373, 3653137, 3775417, 3864037, 4250977, 4298533, 4328053, 4493773, 4504651, 4519981, 4572037, 4647277, 4692637, 4719061, 4726537
Offset: 1

Views

Author

M. F. Hasler, Apr 17 2007

Keywords

Comments

Examples

			a(1) = 2146141 = -1+2*1021*1051 = A129469[6] is a prime of class 6+ since 2146141+1 has prime factor 1021=A081633[1]=A005113[5] of class 5+, but the largest prime factor of 2146141+1 is 1051=A005107[65] of class 3+.
		

Crossrefs

Programs

  • PARI
    class(n,s=1)={n=factor(n+s)[,1];if(n[ #n]<=3,1,for(i=2,#n,n[1]=max(class(n[i],s)+1,n[1]));n[1])}; a129477(n=100,p=1,a=[])={local(f,a5=A005113[5]);p=max(p,a5*nextprime(a5+1)*2-1); while( #a2 & f[ #f-1] >= a5 & 5 > class(f[ #f]), f=factor(1+p=nextprime(p+1))[,1]); forstep( i=#f-1,2,-1, if( 6 < f[1] = max( f[1],1+class( f[i] )), next(2))); if( f[1] == 6, a=concat(a,p); print(#a," ",p))); a}

A129478 Primes p of Erdos-Selfridge class 7+ with largest prime factor of p+1 not of class 6+.

Original entry on oeis.org

17227801, 18207913, 18592957, 19433053, 19608073, 19678081, 20028121, 20518177, 20658193, 20833213, 21043237, 21218257, 21533293, 21743317, 22128361, 22303381, 23668537, 25068697, 25418737, 25453741
Offset: 1

Views

Author

M. F. Hasler, Apr 17 2007

Keywords

Comments

Examples

			a(1) = 17227801 = -1+2*2917*2953 = A129469[7] is a prime of class 7+ since 17227801+1 has prime factor 2917 = A081634[1] = A005113[6] of class 6+, but the largest prime factor of 17227801+1 is 2953 = A005107[175] of class 3+.
		

Crossrefs

Programs

  • PARI
    class(n,s=1)={n=factor(n+s)[,1];if(n[ #n]<=3,1,for(i=2,#n,n[1]=max(class(n[i],s)+1,n[1]));n[1])}; a129478(n=100,p=1,a=[])={local(f,a6=A005113[6]);p=max(p,a6*nextprime(a6+1)*2-2); while( #a2 & f[ #f-1] >= a6 & 6 > class(f[ #f]), f=factor(1+p=nextprime(p+1))[,1]); forstep( i=#f-1,2,-1, if( 7 < f[1] = max( f[1],1+class( f[i] )), next(2))); if( f[1] == 7, a=concat(a,p); print(#a," ",p))); a}

A081640 a(n) = n-th prime of class 12- according to the Erdős-Selfridge classification.

Original entry on oeis.org

14920303, 18224639, 24867247, 26532953, 34548443, 38003011, 39800743, 41319599, 41443483, 45604771, 46432667, 47247763, 49734341, 49734493, 49749439, 51591833, 53014667, 55257977, 59681383, 59700749, 60804817
Offset: 1

Views

Author

Robert G. Wilson v, Mar 23 2003

Keywords

Comments

The first 184 resp. 300 terms of A081430 allow us to deduce 44 resp. 84 consecutive terms of this sequence. - M. F. Hasler, Apr 05 2007

Examples

			a(1) = 14920303 = 1+2*A081430(3)*3 is the smallest 12- prime
		

References

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

Crossrefs

Programs

  • Mathematica
    PrimeFactors[n_Integer] := Flatten[ Table[ #[[1]], {1}] & /@ FactorInteger[n]]; f[n_Integer] := Block[{m = n}, If[m == 0, m = 1, While[ IntegerQ[m/2], m /= 2]; While[ IntegerQ[m/3], m /= 3]]; Apply[Times, PrimeFactors[m] - 1]]; ClassMinusNbr[n_] := Length[ NestWhileList[f, n, UnsameQ, All]] - 3; Prime[ Select[ Range[3610000], ClassMinusNbr[ Prime[ # ]] == 12 &]]
  • PARI
    nextclassminus( a, p=1, n=[] )={ while( p, n=concat(n,p); p=0; for( i=1,#a, if( p & 2*a[i] >= p-1, break); for( k=ceil(n[ #n]/2/a[i]),a[ #a]/a[i], if( p & 2*k*a[i] >= p-1, break); if( isprime(2*k*a[i]+1), p=2*k*a[i]+1; break(1+(k==1)); ))));vecextract(n,"^1")}; A081640 = nextclassminus(A081430) \\ M. F. Hasler, Apr 05 2007

Formula

{ a(n) } = { p = 2*m*A081430(k)+1 | k=1,2,...,oo and m=1,2,... such that p is prime and m has no factor of class > 11- } - M. F. Hasler, Apr 05 2007

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 21 2007

A081641 a(n) = n-th prime of class 13- according to the Erdős-Selfridge classification.

Original entry on oeis.org

36449279, 53065907, 59681213, 69096887, 132756479, 135388367, 164255999, 179043637, 188991053, 207290663, 241560239, 279709259, 309550999, 364492781, 372993983, 377982103, 398007431, 406165099, 425633717, 445901987, 447609067, 516737983
Offset: 1

Views

Author

Robert G. Wilson v, Mar 23 2003

Keywords

References

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

Crossrefs

Programs

  • Mathematica
    PrimeFactors[n_Integer] := Flatten[ Table[ #[[1]], {1}] & /@ FactorInteger[n]]; f[n_Integer] := Block[{m = n}, If[m == 0, m = 1, While[ IntegerQ[m/2], m /= 2]; While[ IntegerQ[m/3], m /= 3]]; Apply[Times, PrimeFactors[m] - 1]]; ClassMinusNbr[n_] := Length[ NestWhileList[f, n, UnsameQ, All]] - 3; Prime[ Select[ Range[23733333], ClassMinusNbr[ Prime[ # ]] == 12 &]]
  • PARI
    A081641 = nextclassminus(A081640) /* cf. A081640 - M. F. Hasler, Apr 05 2007 */

Extensions

Edited by N. J. A. Sloane, May 14 2008 at the suggestion of R. J. Mathar.

A129472 Primes p of Erdos-Selfridge class 4+ with largest prime factor of p+1 not of class 3+.

Original entry on oeis.org

3181, 4513, 4957, 6067, 7177, 8731, 9397, 10433, 13171, 14947, 15761, 17389, 19387, 19609, 22051, 22273, 22453, 22717, 23531, 23753, 24197, 26161, 27823, 28711, 37369, 37591, 38183, 38923, 39293, 40993, 41143, 42697, 43067, 44621, 44843
Offset: 1

Views

Author

M. F. Hasler, Apr 17 2007

Keywords

Comments

Examples

			a(1) = 3181 = -1+2*37*43 is a prime of class 4+ since 37 is of class 3+, but the largest divisor of 3181+1 is 43 which is only of class 2+.
		

Crossrefs

Programs

  • PARI
    class(n,s=1)={n=factor(n+s)[,1];if(n[ #n]<=3,1,for(i=2,#n,n[1]=max(class(n[i],s)+1,n[1]));n[1])}; A129472(n=100,p=1,a=[])={ local(f); while( #a 3 & 3 > class(f[ #f]), f=factor(1+p=nextprime(p+1))[,1]); forstep( i=#f-1,2,-1, if( 4 < f[1] = max( f[1],1+class( f[i] )), next(2))); if( f[1] == 4, a=concat(a,p); /*print(#a," ",p)*/)); a}

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

Original entry on oeis.org

2, 19, 113, 617, 1877, 8753, 52517, 255043, 1532173, 9287521, 48499459, 353653063, 2136716521, 18171787987, 111795382441
Offset: 1

Views

Author

Jonathan Vos Post, Dec 16 2004

Keywords

Comments

Diagonalization of the Erdős-Selfridge classification of primes n+. See A101231 for diagonalization of the Erdős-Selfridge classification of primes n-.

Examples

			a(1) = 2 because 2 is the first element of A005105.
a(2) = 19 because 19 is the 2nd element of A005106.
a(3) = 113 because 113 is the 3rd element of A005107.
a(4) = 617 because 617 is the 4th element of A005108.
a(5) = 1877 because 1877 is the 5th element of A081633.
a(6) = 8753 because 8753 is the 6th element of A081634.
		

References

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

Crossrefs

Extensions

More terms from David Wasserman, Mar 26 2008
Previous Showing 11-20 of 20 results.