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 41-50 of 60 results. Next

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

A374577 Pierpont primes are primes of the form 2^t*3^u + 1; this sequence gives the t's in order.

Original entry on oeis.org

0, 1, 2, 1, 2, 4, 1, 2, 3, 5, 2, 1, 6, 8, 4, 1, 6, 8, 7, 4, 1, 5, 2, 7, 4, 7, 12, 3, 11, 1, 3, 16, 6, 14, 5, 12, 3, 5, 10, 18, 7, 12, 17, 11, 16, 13, 15, 8, 16, 4, 6, 19, 2, 20, 2, 18, 15, 1, 6, 22, 11, 21, 1, 13, 12, 11, 26, 25, 30, 19, 24, 20, 27, 16, 23, 11
Offset: 1

Views

Author

William C. Laursen, Jul 11 2024

Keywords

Comments

This sequence gives the exponents of 2's in the Pierpont primes, A374578 gives the exponents of 3's.

Examples

			a(1) = 0, because the first Pierpont prime is 2 = 2^0 * 3^0 + 1.
a(6) = 4, because the sixth Pierpont prime is 17 = 2^4 * 3^0 + 1.
a(7) = 1, because the seventh Pierpont prime is 19 = 2^1 * 3^2 + 1.
		

Crossrefs

Programs

  • Mathematica
    With[{lim = 10^11}, IntegerExponent[Select[Sort@ Flatten@Table[2^i*3^j + 1, {i, 0, Log2[lim]}, {j, 0, Log[3, lim/2^i]}], PrimeQ] - 1, 2]] (* Amiram Eldar, Sep 02 2024 *)
  • PARI
    lista(lim) = {my(s = List()); for(i = 0, logint(lim, 2), for(j = 0, logint(lim >> i, 3), listput(s, 2^i * 3^j + 1))); s = Set(s); for(i = 1, #s, if(isprime(s[i]), print1(valuation(s[i] - 1, 2), ", ")));} \\ Amiram Eldar, Sep 02 2024

Formula

a(n) = A007814(A005109(n)-1).

Extensions

More terms from Stefano Spezia, Jul 12 2024

A374578 Pierpont primes are primes of the form 2^t*3^u + 1; this sequence gives the u's in order.

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 2, 2, 2, 1, 3, 4, 1, 0, 3, 5, 2, 1, 2, 4, 6, 4, 6, 3, 5, 4, 1, 7, 2, 9, 8, 0, 7, 2, 8, 4, 10, 9, 6, 1, 8, 5, 2, 6, 3, 5, 4, 9, 4, 12, 11, 3, 14, 3, 15, 5, 7, 16, 13, 3, 10, 4, 17, 10, 11, 12, 3, 4, 1, 8, 5, 8, 4, 11, 7, 15, 12, 2, 10, 1, 22, 4
Offset: 1

Views

Author

William C. Laursen, Jul 11 2024

Keywords

Comments

This sequence gives the exponents of 3's in the Pierpont primes, A374577 gives the exponents of 2's.

Examples

			a(1) = 0, because the first Pierpont prime is 2 = 2^0 * 3^0 + 1.
a(6) = 0, because the sixth Pierpont prime is 17 = 2^4 * 3^0 + 1.
a(7) = 2, because the seventh Pierpont prime is 19 = 2^1 * 3^2 + 1.
		

Crossrefs

Programs

  • Mathematica
    With[{lim = 10^12}, IntegerExponent[Select[Sort@ Flatten@Table[2^i*3^j + 1, {i, 0, Log2[lim]}, {j, 0, Log[3, lim/2^i]}], PrimeQ] - 1, 3]] (* Amiram Eldar, Sep 02 2024 *)
  • PARI
    lista(lim) = {my(s = List()); for(i = 0, logint(lim, 2), for(j = 0, logint(lim >> i, 3), listput(s, 2^i * 3^j + 1))); s = Set(s); for(i = 1, #s, if(isprime(s[i]), print1(valuation(s[i] - 1, 3), ", ")));} \\ Amiram Eldar, Sep 02 2024

Formula

a(n) = A007949(A005109(n)-1).

Extensions

More terms from Stefano Spezia, Jul 12 2024

A069358 Primes of the form 2^i*3^j + (i+j) with i, j >= 0.

Original entry on oeis.org

3, 11, 37, 53, 113, 167, 199, 439, 521, 3083, 6569, 12301, 23339, 32783, 139981, 663569, 708601, 3981331, 7558289, 20155411, 38263769, 45349651, 75497497, 483729431, 1934917657, 2717909021, 6115295261, 12397455671, 14693280793
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 18 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Take[ Select[ Union[ Flatten[ Table[2^i*3^j + (i + j), {i, 0, 25}, {j, 0, 18}]]], PrimeQ[ # ] &], 30]

Extensions

Edited and extended by Robert G. Wilson v, May 09 2003

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

A113434 Semi-Pierpont semiprimes which are also Pierpont semiprimes.

Original entry on oeis.org

4, 9, 10, 25, 49, 65, 289
Offset: 1

Views

Author

Jonathan Vos Post, Nov 01 2005

Keywords

Comments

Semiprimes both of whose prime factors are Pierpont primes (A005109), which are primes of the form (2^K)*(3^L)+1 and where the semiprime is itself of the form (2^K)*(3^L)+1.
No more under 10^50; what is the next element of this sequence?
No more terms <= 10^100. - Robert Israel, Mar 10 2017
This sequence is complete, see Links. - Charlie Neder, Feb 04 2019

Examples

			a(1) = 4 = 2^2 = [(2^0)*(3^0)+1]*[(2^0)*(3^0)+1] = (2^0)*(3^1)+1.
a(2) = 9 = 3^2 = [(2^1)*(3^0)+1]*[(2^1)*(3^0)+1] = (2^3)*(3^0)+1.
a(3) = 10 = 2*5 = [(2^0)*(3^0)+1]*[(2^2)*(3^0)+1] = (2^0)*(3^2)+1.
a(4) = 25 = 5^2 = [(2^2)*(3^0)+1]*[(2^2)*(3^0)+1] = (2^3)*(3^1)+1.
a(5) = 49 = 7^2 = [(2^1)*(3^1)+1]*[(2^1)*(3^1)+1] = (2^4)*(3^1)+1.
a(6) = 65 = 5*13 = [(2^2)*(3^0)+1]*[(2^2)*(3^1)+1] = (2^6)*(3^0)+1.
a(7) = 289 = 17^2 = [(2^4)*(3^0)+1]*[(2^4)*(3^0)+1] = (2^5)*(3^2)+1.
		

Crossrefs

Programs

  • Maple
    N:= 10^100: # to get all terms <= N
    PP:= select(isprime, {seq(seq(1+2^i*3^j, i=0..ilog2((N-1)/3^j)),j=0..floor(log[3](N-1)))}):
    SP:= select(t -> t <= N and t = 1+2^padic:-ordp(t-1,2)*3^padic:-ordp(t-1,3), [seq(seq(PP[i]*PP[j], j=1..i),i=1..nops(PP))]):
    sort(convert(SP,list)); # Robert Israel, Mar 10 2017

Formula

{a(n)} = intersection of A113432 and A113433. {a(n)} = Semiprimes A001358 of the form (2^K)*(3^L)+1 both of whose factors are of the form (2^K)*(3^L)+1. {a(n)} = {integers P such that, for nonnegative integers I, J, K, L, m, n there is a solution to (2^I)*(3^J)+1 = [(2^K)*(3^L)+1]*[(2^m)*(3^n)+1] where both [(2^K)*(3^L)+1] and [(2^m)*(3^n)+1] are prime}.

A174099 Indices of primes of the form 2^t*3^u + 1 in the primes.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 12, 21, 25, 29, 38, 44, 55, 84, 93, 106, 136, 191, 211, 232, 378, 422, 483, 539, 1272, 1470, 2014, 2111, 4144, 5359, 6543, 13006, 13632, 18802, 28547, 39420, 51327, 59982, 62947, 66875, 78156, 91466, 113675, 132938, 148273, 193541
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 07 2010

Keywords

Comments

Numbers k such that 2^t*3^u + 1 = prime(k).

Examples

			a(1) = 1 because 2^0 * 3^0 + 1 = 2 = prime(1).
a(2) = 2 because 2^1 * 3^0 + 1 = 3 = prime(2).
		

Crossrefs

Programs

  • Mathematica
    With[{lim = 10^7}, PrimePi[Select[Sort@ Flatten@ Table[2^i * 3^j + 1, {i, 0, Log2[lim]}, {j, 0, Log[3, lim/2^i]}], PrimeQ]]] (* Amiram Eldar, Sep 02 2024 *)
  • PARI
    lista(lim) = {my(s = List()); for(i = 0, logint(lim, 2), for(j = 0, logint(lim >> i, 3), listput(s, 2^i * 3^j + 1))); s = Set(s); for(i = 1, #s, if(isprime(s[i]), print1(primepi(s[i]), ", ")));} \\ Amiram Eldar, Sep 02 2024

Formula

a(n) = A000720(A005109(n)).

Extensions

Corrected and extended by Charles R Greathouse IV, Mar 21 2010

A113420 Number of Pierpont primes less than 10^n.

Original entry on oeis.org

4, 10, 18, 25, 32, 42, 50, 58, 65, 72, 78, 83, 93, 106, 114, 125, 139, 143, 149, 157, 167, 176, 183, 194, 198, 209, 219, 221, 229, 237, 243, 250, 260, 270, 273, 278, 286, 294, 304, 314, 317, 323, 327, 337, 342, 352, 362, 371, 377, 394, 399, 405, 414, 420
Offset: 1

Views

Author

Eric W. Weisstein, Oct 29 2005

Keywords

Crossrefs

A122258 Number of Pierpont primes <= n.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 29 2006

Keywords

Crossrefs

Partial sums of A122257.

Programs

  • Mathematica
    smooth3Q[n_] := Times @@ ({2, 3}^IntegerExponent[n, {2, 3}]) == n; s[n_] := Boole[PrimeQ[n] && smooth3Q[n-1]]; Accumulate[Table[s[n], {n, 1, 100}]] (* Amiram Eldar, May 14 2025 *)
  • PARI
    is3smooth(n) = my(m = n >> valuation(n, 2)); m == 3^valuation(m, 3);
    f(n) = isprime(n) && is3smooth(n-1);
    list(lim) = {my(s = 0); for(n = 1, lim, s += f(n); print1(s, ", "));} \\ Amiram Eldar, May 14 2025

Formula

a(n) <= A000720(n).
a(n) <= A071521(n).

A174144 Primes of the form 2^p*3^q*5^r*7^s + 1.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 29, 31, 37, 41, 43, 61, 71, 73, 97, 101, 109, 113, 127, 151, 163, 181, 193, 197, 211, 241, 251, 257, 271, 281, 337, 379, 401, 421, 433, 449, 487, 491, 541, 577, 601, 631, 641, 673, 701, 751, 757, 769, 811, 883, 1009, 1051, 1153, 1201
Offset: 1

Views

Author

Michel Lagneau, Mar 09 2010

Keywords

Comments

Restricting to r=s=0 gives the Pierpont primes (A005109); s = 0 gives A002200.

Examples

			6301 = 2^2 * 3^2 * 5^2 * 7 + 1.
		

Crossrefs

Programs

  • GAP
    K:=10^7;; # to get all terms <= K.
    A:=Filtered([1..K],IsPrime);;    I:=[3,5,7];;
    B:=List(A,i->Elements(Factors(i-1)));;
    C:=List([0..Length(I)],j->List(Combinations(I,j),i->Concatenation([2],i)));
    A174144:=Concatenation([2],List(Set(Flat(List([1..Length(C)],i->List([1..Length(C[i])], j->Positions(B,C[i][j]))))),i->A[i])); # Muniru A Asiru, Sep 12 2017
  • Magma
    [p: p in PrimesUpTo(2000) | forall{d: d in PrimeDivisors(p-1) | d le 7}]; // Bruno Berselli, Sep 24 2012
    
  • Maple
    with(numtheory):T:=array(0..50000000):U=array(0..50000000 ):k:=1:for a from 0 to 25 do:for b from 0 to 16 do:for c from 0 to 16 do:for d from 0 to 16 do: p:= 2^a*3^b*5^c*7^d + 1:if type(p, prime)=true then T[k]:=p:k:=k+1: else fi: od :od:od:od:mini:=T[1]:ii:=1:for p from 1 to k-1 do:for n from 1 to k-1 do: if T[n] < mini then mini:= T[n]:ii:=n: indice:=U[n]: else f i:od:print(mini):T[ii]:= 10^30: ii:=1:mini:=T[1] :od:
  • Mathematica
    Take[ Select[ Sort[ Flatten[ Table[2^a*3^b*5^c*7^d + 1, {a, 0, 25}, {b, 0, 16},{c, 0, 16},{d, 0, 16}]]], PrimeQ[ # ] &], 100] (* or *) 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[3, 6300],
    ClassMinusNbr[ Prime[ # ]] == 1 &]] Select[Prime /@ Range[10^5], Max @@ First /@ FactorInteger[ # - 1] < 5 &]
  • PARI
    list(lim)={
        lim\=1;
        my(v=List([2]),s,t,p);
        for(i=0,log(lim\2+.5)\log(7),
            t=2*7^i;
            for(j=0,log(lim\t+.5)\log(5),
                s=t*5^j;
                while(s < lim,
                    p=s;
                    while(p < lim,
                        if(isprime(p+1),listput(v,p+1));
                        p <<= 1
                    );
                    s *= 3;
                )
            )
        );
        vecsort(Vec(v))
    }; \\ Charles R Greathouse IV, Sep 21 2011
    
  • Sage
    A174144 = list(p for p in primes(2000) if set(prime_factors(p-1)) <= set([2,3,5,7]))
    

Extensions

Corrected and edited by D. S. McNeil, Nov 20 2010
Previous Showing 41-50 of 60 results. Next