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

A127436 Primes associated with A127435.

Original entry on oeis.org

2, 5, 17, 37, 101, 257, 1297, 1601, 4357, 15877, 16901, 22501, 24337, 32401, 44101, 57601, 62501, 65537, 72901, 78401, 93637, 156817, 160001, 176401, 184901, 217157, 240101, 309137, 324901, 331777, 417317, 476101, 490001, 562501, 577601, 682277
Offset: 1

Views

Author

Lekraj Beedassy, Jan 14 2007

Keywords

Comments

A sequence with P=a(k) distinct numbers contains a subsequence of p=A127435(k) monotonically increasing or decreasing terms, according to a corollary of the Erdos-Szekeres theorem.

Crossrefs

Cf. A127435. Subsequence of A045349.

Programs

  • Mathematica
    Select[(Prime@Range[300] - 1)^2 + 1, PrimeQ] (* Ray Chandler, Jan 23 2007 *)
  • PARI
    listp(nn) = {forprime(p=2, nn, if (isprime(q=(p-1)^2 + 1), print1(q, ", ")););} \\ Michel Marcus, Jun 08 2016

Formula

a(n) = (A127435(n)-1)^2 + 1.

Extensions

Corrected and extended by Ray Chandler, Jan 23 2007

A157468 Primes of the form sqrt(p-1)-1, where p is a prime.

Original entry on oeis.org

3, 5, 13, 19, 23, 53, 73, 83, 89, 109, 149, 179, 223, 229, 239, 263, 269, 283, 313, 349, 383, 419, 439, 443, 463, 569, 593, 643, 653, 673, 739, 859, 863, 919, 929, 1009, 1069, 1093, 1123, 1289, 1319, 1373, 1409, 1429, 1433, 1439, 1459
Offset: 1

Views

Author

Keywords

Examples

			3 is in the sequence because 3 = sqrt(17 - 1) - 1, where 17 is prime.
5 is in the sequence because 5 = sqrt(37 - 1) - 1, where 37 is prime.
		

Crossrefs

Column k=1 of A238048 and A238086.

Programs

  • Mathematica
    Select[Sqrt[#-1]-1&/@Prime[Range[200000]],PrimeQ]  (* Harvey P. Dale, May 19 2012 *)

A157467 Primes of the form p^2 + 2*p + 2 where p is prime.

Original entry on oeis.org

17, 37, 197, 401, 577, 2917, 5477, 7057, 8101, 12101, 22501, 32401, 50177, 52901, 57601, 69697, 72901, 80657, 98597, 122501, 147457, 176401, 193601, 197137, 215297, 324901, 352837, 414737, 427717, 454277, 547601, 739601, 746497, 846401
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [a: p in PrimesUpTo(950) | IsPrime(a) where a is p^2+2*p+2]; // Vincenzo Librandi, Dec 20 2010
    
  • Mathematica
    lst={};Do[p=Prime[n];r=Sqrt[p-1]-1;If[PrimeQ[r],AppendTo[lst,p]],{n,4*8!}];lst
  • PARI
    forprime(p=2,1000,m=p^2+2*p+2;if(isprime(m),print1(m,", ")))

A173444 Either (n-th prime-1)^2-+1, but not both, is prime.

Original entry on oeis.org

1, 3, 4, 5, 7, 12, 13, 19, 31, 32, 36, 37, 42, 47, 53, 54, 55, 58, 60, 63, 78, 79, 82, 83, 91, 94, 102, 105, 106, 118, 125, 126, 133, 135, 144, 155, 156, 159, 161, 163, 178, 184, 190, 206, 210, 214, 216, 219, 247, 248, 284, 286, 288, 307, 313, 315, 322, 336, 340, 344
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 18 2010, Mar 27 2010

Keywords

Comments

Numbers n such that either A005722(n)-+1 is prime.

Examples

			1 is in the sequence because (1st prime-1)^2-1=0 is nonprime and (1st prime-1)^2+1=2 is prime;
3 is in the sequence because (3rd prime-1)^2-1=15 is nonprime and (3rd prime-1)^2+1=17 is prime.
		

Crossrefs

Programs

  • Maple
    A005722 := proc(n) (ithprime(n)-1)^2 ; end proc: for n from 1 to 800 do a := A005722(n) ; if isprime(a-1) <> isprime(a+1) then printf("%d,",n) ; end if; end do: # R. J. Mathar, Apr 24 2010
  • Mathematica
    ppQ[n_]:=Module[{c=(Prime[n]-1)^2},Sort[PrimeQ[{c+1,c-1}]]== {False, True}]; Select[Range[400],ppQ] (* Harvey P. Dale, Jun 24 2011 *)
    Select[Range[400],Total[Boole[PrimeQ[(Prime[#]-1)^2+{1,-1}]]]==1&] (* Harvey P. Dale, Feb 01 2023 *)

Extensions

More terms from R. J. Mathar, Apr 24 2010
Definition clarified by Harvey P. Dale, Jun 24 2011

A173446 ((n+{0,1})-th prime-1)^2+1 are both primes.

Original entry on oeis.org

1, 2, 3, 4, 12, 31, 36, 53, 54, 78, 82, 105, 125, 155, 247, 403, 422, 548, 678, 679, 751, 769, 784, 798, 809, 829, 845, 899, 1049, 1148, 1155, 1312, 1317, 1423, 1436, 1490, 1616, 1688, 1935, 1961, 1990, 1991, 2071, 2181, 2198, 2397, 2437, 2454, 2463, 2556
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 18 2010

Keywords

Comments

Numbers n such that ((n+{0,1})-th prime-1)^2+1 are both primes.

Examples

			a(1)=1 because ((1+0)-th prime-1)^2+1=2=prime and ((1+1)-th prime-1)^2+1=5=prime; a(2)=2 because ((2+0)-th prime-1)^2+1=5=prime and ((2+1)-th prime-1)^2+1=17=prime
		

Crossrefs

Programs

  • Maple
    P:= select(isprime,[2,seq(i,i=3..10^6,2)]):
    J:= select(i -> isprime((P[i]-1)^2+1),{$1..nops(P)}):
    sort(convert(J intersect map(`-`,J,1),list)); # Robert Israel, Sep 29 2024

Extensions

126 removed. Terms beyond 247 added by R. J. Mathar, Mar 01 2010

A376522 Numbers k such that (prime(j)-1)^2 + 1 is prime for k <= j <= k + 2.

Original entry on oeis.org

1, 2, 3, 53, 678, 1990, 5154, 5632, 6412, 8022, 8715, 11211, 13182, 16632, 16793, 17263, 18755, 19484, 23458, 25693, 26960, 28005, 28492, 29024, 31055, 36084, 41707, 44434, 44642, 44936, 46602, 48630, 48631, 54274, 56131, 58219, 58879, 69935, 74008, 76310, 77836, 83540, 83686, 88526, 88877, 91217
Offset: 1

Views

Author

Robert Israel, Sep 29 2024

Keywords

Comments

The first three k such that (prime(j)-1)^2 + 1 is prime for k <= j <= k + 3 are 1, 2, and 48630.
The first two k such that (prime(j)-1)^2 + 1 is prime for k <= j <= k + 4 are 1 and 546158.
The first k such that (prime(j)-1)^2 + 1 is prime for k <= j <= k + 5 is 2296966.

Examples

			a(4) = 53 is a term because the 53rd, 54th and 55th primes are 241, 251, 257, and (241-1)^2 + 1 = 57601, (251-1)^2 + 1 = 62501, and (257-1)^2 + 1 = 65537 are all prime.
		

Crossrefs

Programs

  • Maple
    P:= select(isprime, [2, seq(i, i=3..10^6, 2)]):
    J:= select(i -> isprime((P[i]-1)^2+1), [$1..nops(P)]):
    J[select(i -> J[i+2]=J[i]+2, [$1..nops(J)-2])];

A180643 Numbers n such that 1+phi(n)^2 is prime. Phi is the Euler totient function.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 17, 18, 22, 25, 32, 33, 34, 35, 37, 39, 40, 41, 44, 45, 48, 50, 52, 55, 56, 57, 60, 63, 66, 67, 70, 72, 74, 75, 76, 78, 81, 82, 84, 87, 88, 90, 100, 108, 110, 114, 116, 121, 126, 127, 129, 131, 132, 134, 143, 147, 150, 151, 155
Offset: 1

Views

Author

Carmine Suriano, Sep 14 2010

Keywords

Examples

			a(20)=34 since 1+phi(34)^2 = 1+16^2 = 257 is prime.
		

Crossrefs

Cf. A000010, A127435 (primes in this sequence).

Programs

  • Maple
    select(t -> isprime(numtheory:-phi(t)^2+1), [$1..1000]); # Robert Israel, Mar 11 2020
  • Mathematica
    Select[Range[200],PrimeQ[1+EulerPhi[#]^2]&] (* Harvey P. Dale, Aug 13 2014 *)
  • PARI
    isok(n) = isprime(1 + eulerphi(n)^2) \\ Michel Marcus, Jul 18 2013

A157473 Primes p such that (p-2)^(1/3) -+ 2 are also primes.

Original entry on oeis.org

2, 127, 91127, 328511, 1157627, 2146691, 12326393, 125751503, 693154127, 751089431, 1033364333, 2102071043, 2222447627, 2893640627, 3314613773, 3951805943, 6591796877, 9063964127, 13464285941, 16406426423, 19880486831
Offset: 1

Views

Author

Keywords

Examples

			(127-2)^(1/3) - 2 = 3 and (127-2)^(1/3) + 2 = 7, so 127 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    q=2;lst={};Do[p=Prime[n];r=(p-q)^(1/3)-q;u=(p-q)^(1/3)+q;If[PrimeQ[r]&&PrimeQ[u],AppendTo[lst,p]],{n,4*9!}];lst
    lst = {}; p = 0; While[p < 2955, If[ PrimeQ[p - 2] && PrimeQ[p + 2] && PrimeQ[p^3 + 2], AppendTo[lst, p^3 + 2]]; p++ ]; lst (* Robert G. Wilson v, Mar 08 2009 *)
    Select[Prime[Range[10^6]],AllTrue[Surd[#-2,3]+{2,-2},PrimeQ]&] (* The program generates the first 7 terms of the sequence. *) (* Harvey P. Dale, Aug 31 2024 *)

Extensions

a(8)-a(21) from Robert G. Wilson v, Mar 08 2009

A174165 Numbers n for which (prime(n) - 1)^2 +1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 12, 13, 19, 31, 32, 36, 37, 42, 47, 53, 54, 55, 58, 60, 63, 78, 79, 82, 83, 91, 94, 102, 105, 106, 118, 125, 126, 133, 135, 144, 155, 156, 159, 161, 163, 178, 184, 190, 206, 210, 214, 216, 219, 247, 248, 284, 286, 288, 307, 313, 315, 322
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 10 2010

Keywords

Examples

			a(1) = 1 because (1st prime -1)^2 +1 = (2-1)^2 +1 = 2, a prime; a(2) = 2 because (2nd prime -1)^2 +1 = (3-1)^2 +1 = 5, a prime; a(3) = 3 because (3rd prime -1)^2 +1 = (5-1)^2 +1 = 17, a prime; ... ; a(6) # 6 since (6th prime -1)^2 = (13-1)^2 +1 = 145 = 5*29, which is not a prime; etc.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ[ (Prime@n - 1)^2 + 1]; Select[ Range@ 335, fQ@# &]

Extensions

Edited, corrected and extended by Robert G. Wilson v, Mar 14 2010
Showing 1-9 of 9 results.