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

A292936 a(n) = the least k >= 0 such that floor(n/(2^k)) is a nonprime; a(n) is degree of the "safeness" of prime, 0 if n is not a prime, 1 for unsafe primes (A059456), and k >= 2 for primes that are (k-1)-safe but not k-safe.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 27 2017

Keywords

Comments

Records occur at positions 1, 2, 5, 11, 23, 47, 2879, ... (A292937).

Crossrefs

Cf. A000040, A005385, A066179, A157358, A157359 (positions of terms that are > k, for k = 0..4).
Cf. A059456 (positions of ones).

Programs

  • Maple
    A292936 := proc(n)
        for k from 0 do
            if not isprime(floor(n/2^k)) then
                return k;
            end if;
        end do:
    end proc:
    seq(A292936(n),n=1..100) ; # R. J. Mathar, Sep 28 2017
  • Mathematica
    Table[SelectFirst[Range[0, 10], ! PrimeQ@ Floor[n/(2^#)] &], {n, 105}] (* Michael De Vlieger, Sep 29 2017 *)
  • PARI
    A292936(n) = { my(k=0); while(isprime(n), n >>= 1; k++); k; };
    
  • Scheme
    (define (A292936 n) (A007814 (1+ (A292599 n))))

Formula

a(n) = A007814(1+A292599(n)).
For n >= 1, a(n) <= A078349(n).
For n > 47, a(n) <= A007814(1+n).

A157357 Products of 3 distinct triple-safe primes.

Original entry on oeis.org

777239, 1555559, 3112199, 4409399, 10635959, 12192599, 23348519, 23796743, 30612839, 47610023, 48628127, 55778519, 67454423, 91581239, 95286263, 97290047, 99883319, 102996599, 104812679, 135002663, 137841647, 148398599, 162707543, 170450999, 172007639, 186520823
Offset: 1

Views

Author

Keywords

Examples

			777239=23*47*719; 23, 47, and 719 are triple-safe prime numbers.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[If[Plus@@Last/@FactorInteger[n]==3,a=Length[First/@FactorInteger[n]];If[a==3,b=First/@FactorInteger[n];c=b[[1]];d=b[[2]];e=b[[3]];If[PrimeQ[cx=(c-1)/2]&&PrimeQ[cy=(cx-1)/2]&&PrimeQ[(cy-1)/2]&&PrimeQ[dx=(d-1)/2]&&PrimeQ[dy=(dx-1)/2]&&PrimeQ[(dy-1)/2]&&PrimeQ[ex=(e-1)/2]&&PrimeQ[ey=(ex-1)/2]&&PrimeQ[(ey-1)/2],AppendTo[lst,n]]]],{n,9!,11!}];lst
  • PARI
    list(lim)=my(v=List(), P=select(p->isprime(p\2) && isprime(p\4) && isprime(p\8), primes([11, sqrtint(lim\11+1)-1])), p, q, t); for(i=1, #P, p=P[i]; if(p^3>=lim, break); for(j=i+1, #P, q=P[j]; t=p*q; forprime(r=q+4, lim\t, if(isprime(r\2) && isprime(r\4) && isprime(r\8), listput(v, r*t))))); Set(v); \\ Charles R Greathouse IV, Oct 14 2021

Extensions

a(5)-a(26) from Charles R Greathouse IV, Oct 14 2021

A157359 Quatro-safe primes.

Original entry on oeis.org

47, 1439, 2879, 858239, 861599, 982559, 1014719, 1067999, 2029439, 2034239, 2297759, 2683679, 2978399, 3301919, 4068479, 4288799, 4737599, 5454719, 6484319, 6753119, 7145759, 8624159, 9511199, 9717119, 10533599, 10739999
Offset: 1

Views

Author

Keywords

Comments

(47-1)/2=23,(23-1)/2=11,(11-1)/2=5,(5-1)/2=2(prime),...

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[a=(p-1)/2]&&PrimeQ[b=(a-1)/2]&&PrimeQ[c=(b-1)/2]&&PrimeQ[(c-1)/2],AppendTo[lst,p]],{n,10!}];lst
    Select[Prime[Range[711000]],AllTrue[Rest[NestList[(#-1)/2&,#,4]], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 31 2018 *)

A292937 a(0)=1, followed by highly safe primes: positions of records in A292936.

Original entry on oeis.org

1, 2, 5, 11, 23, 47, 2879, 71850239, 2444789759, 21981381119
Offset: 0

Views

Author

Antti Karttunen, Sep 28 2017

Keywords

Comments

The starting offset is 0 to accommodate 1, which is only nonprime in this sequence, and also to align with the indexing used in A110056.
Sequence starts like A007505, and at least for terms a(5) .. a(9) is equal to A110056.

Crossrefs

Cf. A000040, A005385, A066179, A157358, A157359 (each starts with the term a(1) .. a(5) of this sequence).

Programs

  • Mathematica
    With[{s = Table[SelectFirst[Range[0, 10], ! PrimeQ@ Floor[n/(2^#)] &], {n, 10^7}]}, Map[FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]]] (* Michael De Vlieger, Sep 29 2017 *)

A328799 Primes p that are simultaneously of the forms 2*q+1, 4*r+3, 6*s+5 and 8*t+7 where q,r,s,t are primes.

Original entry on oeis.org

23, 47, 1439, 2879, 11279, 51599, 209519, 243119, 349199, 507359, 700319, 903359, 1190639, 1342079, 1650959, 1956719, 2978399, 3304079, 3376559, 3841679, 4858559, 5404319, 5454719, 6207599, 6486479, 7682399, 7825439, 8169599, 8826479, 8970959, 9546959
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Nov 18 2019

Keywords

Comments

All terms == 23 (mod 24). All but the first == 47 (mod 48).

Examples

			a(3)=1439 is a term because 1439=2*719+1=4*359+3=6*239+5=8*179+7 and 1439, 719, 359, 239 and 179 are all primes.
		

Crossrefs

Programs

  • Maple
    map(t -> 24*t+23, select(k -> andmap(isprime, [3*k+2,4*k+3,6*k+5,12*k+11,24*k+23]), [0, seq(k,k=1..10^6,2)]));

Extensions

Clarified definition. - N. J. A. Sloane, Nov 15 2021

A162021 Triple-safe primes which are also triple-Sophie Germain primes.

Original entry on oeis.org

8981279, 17313839, 18635759, 82062479, 82479119, 98517599, 112242479, 113164319, 152799359, 184829279, 193409039, 230749199, 296709839, 305598719, 339116159, 393280799, 406283519
Offset: 1

Views

Author

Keywords

Comments

The intersection of the primes in A157358 and those in A023272: they remain prime after each
of three successive applications of the substitution p->(p-1)/2, and remain prime after each
three successive applications of the substitution p->2p+1. Therefore the sequence is a subsequence
They appear for example in the middle of chains started in A059767 or in even longer Cunningham chains. [R. J. Mathar, Jun 26 2009].

Programs

  • Mathematica
    f[n_]:=Module[{x},If[PrimeQ[(n-1)/2]&&PrimeQ[(((n-1)/2)-1)/2]&&PrimeQ[(((((n-1)/ 2)-1)/2)-1)/2]&&PrimeQ[2*n+1]&&PrimeQ[2*(2*n+1)+1]&&PrimeQ[2*(2*(2*n+1)+1)+1], x=1,x=0];x]; lst={};Do[p=Prime[n];If[f[p]!=0,AppendTo[lst,p]],{n, 6*10!}];lst

Extensions

Edited by R. J. Mathar, Jun 26 2009
Showing 1-6 of 6 results.