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 31-40 of 48 results. Next

A068485 One-sixtieth of the even leg of Pythagorean triangles whose other sides are both primes (other than 3, 5 or 13).

Original entry on oeis.org

1, 3, 7, 29, 31, 42, 52, 85, 143, 161, 273, 330, 612, 1015, 1197, 1394, 1680, 1771, 2262, 2698, 2717, 3318, 3424, 3641, 4551, 4700, 5617, 6468, 7192, 8184, 8858, 8996, 9205, 9523, 9919, 10622, 11040, 11427, 11623, 15436, 17256, 17739, 18476, 18725, 19533
Offset: 1

Views

Author

Lekraj Beedassy, Mar 11 2002

Keywords

Comments

The (primitive) Pythagorean triple is {A048161(n), A067755(n), A067756(n)}.

Crossrefs

Programs

  • Mathematica
    a068485[n_] := (Select[Map[Prime[#]^2&, Range[4, n]], PrimeQ[(#+1)/2]&]-1)/120
    a068485[250] (* data - Hartmut F. W. Hoft, Aug 06 2020 *)

Formula

From Hartmut F. W. Hoft, Aug 06 2020: (Start)
a(n) = A067755(n+2)/60, n>=1.
a(n) = (A263951(n+2) - 1)/120, n>=1. (End)

Extensions

More terms from Sascha Kurz, Mar 26 2002
a(34)-a(45) from Ray Chandler, Apr 12 2010

A094516 Primes p such that q=(p^2+1)/2 is not a prime.

Original entry on oeis.org

2, 7, 13, 17, 23, 31, 37, 41, 43, 47, 53, 67, 73, 83, 89, 97, 103, 107, 109, 113, 127, 137, 149, 151, 157, 163, 167, 173, 179, 191, 193, 197, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 353, 359, 367, 373
Offset: 1

Views

Author

N. J. A. Sloane, following a suggestion by R. K. Guy, Jun 05 2004

Keywords

Crossrefs

Complement in primes of A048161.

Programs

  • Mathematica
    Select[Prime[Range[100]],!PrimeQ[(#^2+1)/2]&] (* Harvey P. Dale, Apr 26 2017 *)
  • Python
    from sympy import isprime
    def ok(n): return (isprime(n) and (n == 2 or not isprime((n*n + 1)//2)))
    print(*list(filter(ok, range(2, 360))), sep = ', ') # Ya-Ping Lu, May 01 2025

A164511 Least prime p such that p^2+1 is the product of n distinct primes.

Original entry on oeis.org

2, 3, 13, 47, 463, 2917, 30103, 241727, 3202337, 26066087, 455081827, 7349346113, 122872146223, 2523038248697, 28435279521433, 119919330795347
Offset: 1

Views

Author

T. D. Noe, Aug 14 2009

Keywords

Comments

For n>1, there appear to be an infinite number of primes q for which q^2+1 is the product of n distinct primes (and thus has 2^n divisors). This sequence gives the smallest such prime for each n. See A048161 for primes q such that q^2+1 has two prime factors. Note that all prime factors of p^2+1 must be 2 or primes of the form 4k+1.

Examples

			1+2^2 = 5
1+3^2 = 2*5
1+13^2 = 2*5*17
1+47^2 = 2*5*13*17
1+463^2 = 2*5*13*17*97
1+2917^2 = 2*5*13*29*37*61
1+30103^2 = 2*5*13*17*41*73*137
1+241727^2 = 2*5*13*17*29*37*41*601
1+3202337^2 = 2*5*13*17*29*41*73*193*277
1+26066087^2 = 2*5*13*17*29*37*41*89*233*337
1+455081827^2 = 2*5*13*17*37*53*61*73*97*317*349
		

Crossrefs

Cf. A180278.

Programs

  • Mathematica
    nn=8; t=Table[0,{nn}]; p=1; While[Times@@t==0, While[p=NextPrime[p]; {q,e}=Transpose[FactorInteger[p^2+1]]; !(Union[e]=={1} && Length[e]<=nn && t[[Length[e]]]==0)]; t[[Length[e]]]=p]; t
  • PARI
    generate(A, B, n) = A=max(A, vecprod(primes(n))); (f(m, p, j) = my(list=List()); my(s=sqrtnint(B\m, j)); if(j==1, forprime(q=max(p, ceil(A/m)), s, if(q%4 == 3, next); my(v=m*q); if(issquare(v-1) && isprime(sqrtint(v-1)), listput(list, sqrtint(v-1)))), forprime(q=p, s, if(q%4 == 3, next); list=concat(list, f(m*q, q+1, j-1)))); list); vecsort(Vec(f(1, 2, n)));
    a(n) = my(x=vecprod(primes(n)), y=2*x); while(1, my(v=generate(x, y, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Feb 20 2023

Formula

a(n) >= A180278(n). - Daniel Suteu, Feb 20 2023

Extensions

a(12)-a(13) from Donovan Johnson, Oct 09 2009
a(14)-a(16) from Daniel Suteu, Feb 20 2023

A179502 Numbers k with the property that k^2, k^2+1 and k^2+2 are all semiprimes.

Original entry on oeis.org

11, 29, 79, 271, 379, 461, 521, 631, 739, 881, 929, 1459, 1531, 1709, 2161, 2239, 2341, 2729, 3049, 3491, 3709, 4021, 4349, 4561, 4691, 5021, 5281, 5851, 5879, 6301, 6329, 6829, 7559, 8009, 9151, 10069, 10099, 10151, 10529, 10891, 11719, 11959, 11969, 13799, 14051, 14159
Offset: 1

Views

Author

Zak Seidov, Jan 08 2011

Keywords

Comments

From the first 10^6 primes, 6680 are terms of the sequence.
Also, all numbers k^2+1 are twice prime, and k^2+2 are thrice prime.
The number of terms less than 10^m beginning with m = 1: 0, 3, 11, 35, 160, 759, 4668, 30319, 204439, ..., .
The number of terms less than the (10^m)-th prime beginning with m = 1: 2, 7, 33, 165, 941, 6680, 48977, 373627, ..., .

Crossrefs

n^2 are squares in A070552, which is a subsequence of A056809 (m and m+1 are semiprimes) and A001358 (semiprimes).
The sequence is a subsequence of A048161.

Programs

  • Mathematica
    fQ[n_] := PrimeQ[(n^2 + 1)/2] && PrimeQ[(n^2 + 2)/3]; Select[ Prime@ Range@ 1667, fQ] (* Robert G. Wilson v, Feb 26 2011 *)
    Select[Range[15000],PrimeOmega[#^2+{0,1,2}]=={2,2,2}&] (* Harvey P. Dale, May 12 2025 *)
  • PARI
    {n=10;for(i=1,10^4,n=nextprime(n+1);n2=n^2;if(2==bigomega(n2+1)&&2==bigomega(n2+2),print1(n,",")))}

A281505 Numbers of the form y^2 - x^2 such that x^2 + y^2 is a prime and 0 < x < y.

Original entry on oeis.org

3, 5, 9, 11, 15, 19, 21, 25, 29, 35, 39, 45, 49, 51, 55, 59, 61, 65, 69, 71, 75, 79, 85, 91, 95, 99, 101, 105, 115, 121, 129, 131, 139, 141, 145, 159, 165, 169, 171, 175, 181, 189, 195, 199, 201, 205, 209, 215, 219, 221
Offset: 1

Views

Author

Thomas Ordowski, Jan 23 2017

Keywords

Comments

What is the natural density of this set of these numbers?
There are 204 terms up to 10^3, 1849 up to 10^4, 16881 up to 10^5, 160194 up to 10^6, 1531730 up to 10^7, and 14766494 up to 10^8. - Charles R Greathouse IV, Jan 23 2017
Numbers of the form s*t where 0 < s < t and (s^2 + t^2)/2 is prime. - Robert Israel, Jan 23 2017

Crossrefs

Cf. A002144, A048161 is a subsequence, A070079 contains the same numbers.

Programs

  • Maple
    filter:= proc(n)
      ormap(s -> isprime((s^2 + (n/s)^2)/2), select(s -> s^2Robert Israel, Jan 23 2017
  • Mathematica
    filter[n_] := AnyTrue[Select[Divisors[n], #^2 < n & ], PrimeQ[(#^2 + (n/#)^2)/2] & ];
    Select[Range[1, 1000, 2], filter] (* Jean-François Alcover, Nov 27 2017, after Robert Israel *)
  • PARI
    list(lim)=my(v=List()); for(a=1,sqrtint(lim\=1), for(x=1,(lim-a^2)\2\a, if(isprime((x+a)^2+x^2), listput(v,(x+a)^2-x^2)))); Set(v) \\ Charles R Greathouse IV, Jan 23 2017

Formula

a(n) = n(log n)^c /(log log n)^O(1), where c = 1 - (1 + log log 2)/log 2 = 0.086... Cf. A027424. - Conjectured by Carl Pomerance, Jan 25 2017

Extensions

More terms from Altug Alkan, Jan 23 2017
a(17)-a(50) from Charles R Greathouse IV, Jan 23 2017

A284036 Positive integers n such that (n^2 - 3)/2 and (n^2 + 1)/2 are twin primes.

Original entry on oeis.org

3, 5, 11, 19, 25, 29, 65, 79, 101, 205, 209, 221, 245, 275, 289, 299, 349, 371, 409, 415, 449, 521, 535, 569, 571, 575, 595, 649, 661, 695, 739, 781, 791, 935, 949, 991, 1081, 1091, 1099, 1129, 1181, 1225, 1241, 1285, 1345, 1349, 1459, 1489, 1531, 1541, 1615
Offset: 1

Views

Author

Giuseppe Coppoletta, Mar 27 2017

Keywords

Comments

All terms are obviously odd.

Examples

			25 is a term because (25^2 - 3)/2 = 311 and (25^2 + 1)/2 = 313 are twin primes.
		

Crossrefs

Programs

  • Maple
    filter:= n -> isprime((n^2-3)/2) and isprime((n^2+1)/2):
    select(filter, [seq(i,i=1..2000,2)]); # Robert Israel, Apr 24 2017
  • Mathematica
    Select[Range[1, 1285, 2], Times @@ Boole@ Map[PrimeQ, (#^2 + {-3, 1})/2] == 1 &] (* Michael De Vlieger, Mar 28 2017 *)
  • PARI
    isok(n) = isprime((n^2 - 3)/2) && isprime((n^2 + 1)/2); \\ Michel Marcus, Apr 04 2017
    
  • Python
    from sympy import isprime
    print([n for n in range(3, 1700, 2) if isprime((n**2 - 3)//2) and isprime((n**2 + 1)//2)]) # Indranil Ghosh, Apr 04 2017
  • Sage
    [n for n in range(3,1700,2) if is_prime((n^2 - 3)//2) and is_prime((n^2 + 1)//2)]
    

A140391 Pythagorean triangle side lengths triples with two lengths prime.

Original entry on oeis.org

4, 3, 5, 12, 5, 13, 60, 11, 61, 180, 19, 181, 420, 29, 421, 1740, 59, 1741, 1860, 61, 1861, 2520, 71, 2521, 3120, 79, 3121, 5100, 101, 5101, 8580, 131, 8581, 9660, 139, 9661, 16380, 181, 16381, 19800, 199, 19801, 36720, 271, 36721, 60900, 349, 60901, 71820
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 13 2008

Keywords

Comments

Or: consecutive triples of x=A067755(j), y=A048161(j), z=A067756(j), j>=1.

Examples

			Contains (x,y,z) = (4,3,5) with 4^2+3^2=5^2 and 3 and 5 prime, then (12,5,13) with 12^5+5^2=13^2 and 5 and 13 prime, then (60,11,61) with 60^2+11^2=61^2 etc. x^2+y^2=z^2
		

Extensions

Edited and extended by R. J. Mathar, Jun 17 2008

A143822 Primes p such that sigma_0((p*p + 1)/2) = 4.

Original entry on oeis.org

13, 17, 23, 31, 37, 53, 67, 89, 97, 103, 109, 113, 127, 137, 149, 151, 163, 167, 179, 197, 211, 223, 227, 229, 241, 263, 269, 277, 281, 283, 311, 331, 347, 359, 367, 373, 383, 389, 397, 419, 431, 433, 439, 479, 491, 503, 509, 541, 547, 587, 601, 617, 619, 653
Offset: 1

Views

Author

Ctibor O. Zizka, Sep 02 2008

Keywords

Comments

A048161 are primes p such that sigma_0((p*p+1)/2)= 2. Primes p such that sigma_0((p*p+1)/2)= 3 gives all RMS numbers (A140480) with 2 divisors (prime RMS numbers, prime NSW numbers (A088165)) and all RMS numbers with 4 divisors as those are a multiple of two nonequal RMS prime numbers. In general we look after primes p such that sigma_0((p*p+1)/2) equals some given integer k. RMS numbers n=p_1*...*p_t have k=2^t divisors (p_i prime, t integer >=1) and sigma_2(p_1*...*p_t)=(2^t)* (q_1^r_1 *...* q_t^r_t), q_j prime, r_t integer >=1.

Crossrefs

Programs

  • Maple
    A066885 := proc(n) local p; p :=ithprime(n) ; (p^2+1)/2 ; end: A000005 := proc(n) numtheory[tau](n) ; end: for n from 2 to 300 do if A000005(A066885(n)) = 4 then printf("%d,",ithprime(n)) ; fi; od: # R. J. Mathar, Sep 04 2008
  • Mathematica
    Select[Range[650], PrimeQ[#] && DivisorSigma[0, (#^2 + 1)/2] == 4 &] (* Amiram Eldar, Mar 11 2020 *)
    Select[Prime[Range[150]],DivisorSigma[0,(#^2+1)/2]==4&] (* Harvey P. Dale, Sep 22 2022 *)

Extensions

97 inserted and extended by R. J. Mathar, Sep 04 2008

A173875 Primes p of the form a^2-b^2 and p*a-b is also prime (with b=prime and a=b+1).

Original entry on oeis.org

5, 11, 59, 1439, 2459, 2819, 3119, 4079, 4799, 5399, 5879, 6899, 7559, 12539, 13799, 14159, 16139, 19379, 25919, 27239, 28019, 28499, 29759, 39119, 40739, 41519, 42179, 44159, 44939, 46919, 53759, 57119, 60539, 63599, 64019, 65579, 66359
Offset: 1

Views

Author

Vincenzo Librandi, Mar 06 2010

Keywords

Examples

			p=11 is in this sequence because 6^2-5^2=11 and 11*6-5=61.
4799 is in this sequence because 2400^2-2399^2=4799 and 4799*2400-2399=11515201.
		

Programs

  • Magma
    [p: p in PrimesUpTo(10^5) | IsPrime((p-1) div 2) and IsPrime((p^2+1) div 2)]; // Vincenzo Librandi Aug 21 2014
  • Mathematica
    Select[Prime[Range[10000]], PrimeQ[(# - 1)/2] &&PrimeQ[ (#^2 + 1)/2] &] (* Vincenzo Librandi, Aug 21 2014 *)

Formula

A005385 INTERSECT A048161. [R. J. Mathar, Mar 29 2010]

Extensions

Missing terms inserted and sequence extended by R. J. Mathar, Mar 29 2010

A230444 Primes of the form (p^k + k - 1)/k for prime p and some k > 1.

Original entry on oeis.org

5, 13, 61, 157, 181, 421, 601, 733, 821, 1741, 1861, 2287, 2521, 3121, 5101, 8581, 9661, 9931, 16381, 19609, 19801, 36721, 60901, 71821, 83641, 100801, 106261, 135721, 161881, 163021, 199081, 205441, 218461, 273061, 282001, 337021, 388081, 431521, 491041
Offset: 1

Views

Author

Irina Gerasimova, Oct 18 2013

Keywords

Examples

			601 is a term because (7^4 + 4 - 1)/4 = 601 where 7, 601 are both prime,
733 is a term because (13^3 + 3 -1)/3 = 733 where 13, 733 are both prime,
821 is a term because (3^8 + 8 - 1)/8 = 821 where 3, 821 are both prime.
		

Crossrefs

Programs

  • Maple
    N:= 10^6: # for terms <= N
    S:= {}: p:= 1:
    do
      p:= nextprime(p);
      if p^2/2 > N then break fi;
      for k from 2 do
        v:= (p^k + k - 1)/k;
        if v > N then break fi;
        if v::integer and isprime(v) then  S:= S union {v} fi;
    od od:
    sort(convert(S,list)); # Robert Israel, Jun 22 2023
  • PARI
    isA230444(n) = {isprime(n) || return(0); my(k = 2, v, p); while (1, v = k*n+1-k; if (ispower(v, k, &p) && isprime(p), return(1)); if (v < 2^k, return(0)); k++;);} \\ Michel Marcus, Oct 19 2013

Extensions

More terms from Michel Marcus, Oct 19 2013
Previous Showing 31-40 of 48 results. Next