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-10 of 11 results. Next

A068443 Triangular numbers which are the product of two primes.

Original entry on oeis.org

6, 10, 15, 21, 55, 91, 253, 703, 1081, 1711, 1891, 2701, 3403, 5671, 12403, 13861, 15931, 18721, 25651, 34453, 38503, 49141, 60031, 64261, 73153, 79003, 88831, 104653, 108811, 114481, 126253, 146611, 158203, 171991, 188191, 218791, 226801, 258121, 269011
Offset: 1

Views

Author

Stephan Wagler (stephanwagler(AT)aol.com), Mar 09 2002

Keywords

Comments

These triangular numbers are equal to p * (2p +- 1).
All terms belong to A006987. For n>2 all terms are odd and belong to A095147. - Alexander Adamchuk, Oct 31 2006
A156592 is a subsequence. - Reinhard Zumkeller, Feb 10 2009
Triangular numbers with exactly 4 divisors. - Jon E. Schoenfield, Sep 05 2018

Examples

			Triangular numbers begin 0, 1, 3, 6, 10, ...; 6=2*3, and 2 and 3 are two distinct primes; 10=2*5, and 2 and 5 are two distinct primes, etc. - _Vladimir Joseph Stephan Orlovsky_, Feb 27 2009
a(11) = 1891 and 1891 = 31 * 61.
		

Crossrefs

Programs

  • Maple
    q:= n-> is(numtheory[bigomega](n)=2):
    select(q, [i*(i+1)/2$i=0..1000])[];  # Alois P. Heinz, Mar 27 2024
  • Mathematica
    Select[ Table[ n(n + 1)/2, {n, 1000}], Apply[Plus, Transpose[ FactorInteger[ # ]] [[2]]] == 2 &]
    Select[Accumulate[Range[1000]],PrimeOmega[#]==2&] (* Harvey P. Dale, Apr 03 2016 *)
  • PARI
    list(lim)=my(v=List());forprime(p=2,(sqrtint(lim\1*8+1)+1)\4, if(isprime(2*p-1),listput(v,2*p^2-p)); if(isprime(2*p+1), listput(v,2*p^2+p))); Vec(v) \\ Charles R Greathouse IV, Jun 13 2013

Formula

A010054(a(n))*A064911(a(n)) = 1. - Reinhard Zumkeller, Dec 03 2009
a(n) = A000217(A164977(n)). - Zak Seidov, Feb 16 2015

Extensions

Edited by Robert G. Wilson v, Jul 08 2002
Definition corrected by Zak Seidov, Mar 09 2008

A065966 Numbers k such that phi(k) / 2 is prime.

Original entry on oeis.org

5, 7, 8, 9, 10, 11, 12, 14, 18, 22, 23, 46, 47, 59, 83, 94, 107, 118, 166, 167, 179, 214, 227, 263, 334, 347, 358, 359, 383, 454, 467, 479, 503, 526, 563, 587, 694, 718, 719, 766, 839, 863, 887, 934, 958, 983, 1006, 1019, 1126, 1174, 1187, 1283, 1307, 1319
Offset: 1

Views

Author

Joseph L. Pe, Dec 08 2001

Keywords

Comments

This is probably an infinite sequence, but a proof would be nice. Are there infinitely many consecutive terms of the sequence which are also consecutive integers? (For example, 7, 8 and 46, 47.)
Apart from 8, 9, 12 and 18, all the terms of the sequence are safe primes or twice safe primes. It is not known if there are infinitely many safe primes (cf. A005385, A005384). For consecutive terms of the sequence which are also consecutive integers see A066179. - Vladeta Jovovic, Dec 16 2001

Examples

			phi(46)/2 = 22/2 = 11, a prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1400],PrimeQ[EulerPhi[#]/2]&] (* Harvey P. Dale, Feb 11 2020 *)
  • PARI
    for(n=3,5000, if(isprime(eulerphi(n)/2),print1(n,",")))
    
  • PARI
    { n=0; for (m=3, 10^9, if (isprime(eulerphi(m)/2), write("b065966.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Nov 05 2009

Formula

Numbers k such that A068212(k) = 2.

Extensions

More terms from Jason Earls, Dec 09 2001
Edited by Charles R Greathouse IV, Mar 18 2010

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).

A157358 Triple-safe primes p: p, (p-1)/2, (p-3)/4, and (p-7)/8 are all prime.

Original entry on oeis.org

23, 47, 719, 1439, 2879, 4079, 9839, 11279, 21599, 28319, 51599, 84719, 92399, 95279, 96959, 137279, 157679, 159119, 178799, 209519, 219839, 243119, 349199, 429119, 430799, 441839, 462719, 481199, 491279, 507359, 533999, 571199, 597599
Offset: 1

Views

Author

Keywords

Comments

These occur in a proof of nonexistence of a certain type of permutation group for p (Theorem 8 by Ito). - R. J. Mathar, May 29 2011

Examples

			(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[(b-1)/2],AppendTo[lst,p]],{n,9!}];lst
  • PARI
    is(n)=n%8==7 && isprime(n) && isprime(n\2) && isprime(n\4) && isprime(n\8) \\ Charles R Greathouse IV, Oct 14 2021
    
  • PARI
    list(lim)=my(v=List()); forprimestep(p=23,lim\1,8, if(isprime(p\8) && isprime(p\4) && isprime(p\2), listput(v,p))); Vec(v); \\ Charles R Greathouse IV, Oct 14 2021

Formula

a(n) >> n log^(4) n. - Charles R Greathouse IV, Oct 14 2021

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 *)

A162019 Double-safe primes which are also double-Sophie Germain primes.

Original entry on oeis.org

11, 359, 719, 214559, 215399, 245639, 253679, 266999, 507359, 508559, 574439, 670919, 744599, 825479, 1017119, 1072199, 1184399, 1363679, 1621079, 1688279, 1786439, 2156039, 2377799, 2429279, 2633399, 2684999, 2900039, 3103799
Offset: 1

Views

Author

Keywords

Comments

The intersection of the primes in A066179 and those in A007700: they remain prime after each of two successive applications of the substitution p->(p-1)/2, and remain prime after each two successive applications of the substitution p->2p+1.

Examples

			a(1)=11 is double safe: (11-1)/2=5; (5-1)/2=2, and double Sophie-Germain: 2*11+1=23; 2*23+1=47.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[safe=(p-1)/2],If[PrimeQ[(safe-1)/2],If[PrimeQ[sophie=2*p+1],If[PrimeQ[2*sophie+1],AppendTo[lst,p]]]]],{n,3*9!}];lst

Formula

a(n) = 4*A023302(n) + 3 = (A157359(n)-3)/4. - R. J. Mathar, Jun 26 2009

Extensions

Edited by R. J. Mathar, Jun 26 2009

A157356 Products (semiprimes) of two distinct double-safe primes.

Original entry on oeis.org

253, 517, 1081, 1837, 3841, 3949, 7849, 7909, 8257, 15829, 16537, 16873, 22429, 31669, 33097, 33793, 44869, 45397, 46897, 54109, 59953, 62029, 63877, 65197, 66217, 66517, 67633, 79717, 83149, 83677, 84997, 93817, 94921, 95833, 108229
Offset: 1

Views

Author

Keywords

Comments

253=11*23; 11 and 23 are double safe prime numbers; (11-1)/2=5; (5-1)/2=2(prime); (23-1)/2=11; (11-1)/2=5(prime), ...

Crossrefs

Programs

  • Mathematica
    lst={};Do[If[Plus@@Last/@FactorInteger[n]==2,a=Length[First/@FactorInteger[n]];If[a==2,b=First/@FactorInteger[n];c=b[[1]];d=b[[2]];If[PrimeQ[cx=(c-1)/2]&&PrimeQ[(cx-1)/2]&&PrimeQ[dx=(d-1)/2]&&PrimeQ[(dx-1)/2],AppendTo[lst,n]]]],{n,9!}];lst

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
Showing 1-10 of 11 results. Next