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

A238086 Square array A(n,k), n>=1, k>=1, read by antidiagonals, where column k is the increasing list of all primes p such that (p+k)^2+k is prime but (p+j)^2+j is not prime for all 0

Original entry on oeis.org

3, 7, 5, 11, 31, 13, 29, 47, 37, 19, 193, 41, 59, 43, 23, 139, 331, 113, 61, 79, 53, 107, 523, 409, 163, 67, 97, 73, 181, 293, 563, 457, 173, 71, 103, 83, 101, 277, 359, 769, 487, 199, 127, 241, 89, 17, 191, 541, 389, 853, 787, 211, 131, 271, 109
Offset: 1

Views

Author

Alois P. Heinz, Feb 17 2014

Keywords

Examples

			Column k=3 contains prime 47 because (47+3)^2+3 = 2503 is prime and (47+2)^2+2 = 2403 = 3^3*89 and (47+1)^2+1 = 2305 = 5*461 are composite.
Square array A(n,k) begins:
:   3,   7,  11,  29, 193,  139, 107,  181, ...
:   5,  31,  47,  41, 331,  523, 293,  277, ...
:  13,  37,  59, 113, 409,  563, 359,  541, ...
:  19,  43,  61, 163, 457,  769, 389,  937, ...
:  23,  79,  67, 173, 487,  853, 397, 1381, ...
:  53,  97,  71, 199, 787, 1019, 401, 1741, ...
:  73, 103, 127, 211, 829, 1489, 433, 2551, ...
:  83, 241, 131, 251, 991, 1553, 461, 2617, ...
		

Crossrefs

Main diagonal gives A238663.
Cf. A238048.

Programs

  • Maple
    A:= proc() local h, p, q; p, q:= proc() [] end, 2;
          proc(n, k)
            while nops(p(k))
    				
  • Mathematica
    nmax = 12;
    col[k_] := col[k] = Reap[For[cnt = 0; p = 2, cnt < nmax, p = NextPrime[p], If[PrimeQ[(p+k)^2+k] && AllTrue[Range[k-1], !PrimeQ[(p+#)^2+#]&], cnt++; Sow[p]]]][[2, 1]];
    A[n_, k_] := col[k][[n]];
    Table[A[n-k+1, k], {n, 1, nmax}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, May 03 2019 *)

A246748 Numbers n such that A242719(n) = (prime(n))^2+1 and A242720(n) - A242719(n) = 2*(prime(n)+1).

Original entry on oeis.org

3, 52, 104, 209, 343, 373, 398, 473, 628, 2633, 3273, 7538, 8060, 8813, 9025, 10847, 12493, 13768, 14196, 15486, 16865, 17486, 18362, 18613, 18842, 21175, 23522, 31825, 33537, 34507, 38740, 39603, 41802, 41947, 43314, 45479, 47550, 47668, 47787, 50321, 50682
Offset: 1

Views

Author

Vladimir Shevelev, Sep 02 2014

Keywords

Comments

If the sequence is infinite, then lim inf(A242719(k)/(prime(k))^2) = 1 and lim inf(A242720(k)/(prime(k))^2) = 1.
In connection with this, one can conjecture that A242719(k) ~ A242720(k) ~ (prime(k))^2, as k goes to infinity (cf. A246819, A246821).
n is in the sequence if and only if prime(n)>=5 and is in the intersection of A001359, A062326, A157468.
Proof. Firstly note that A242719(n) = prime(n)^2 + 1 if and only if prime(n)^2 - 2 is prime. Indeed, let prime(n)^2 + 1 be A242719(n). Then we have lpf(prime(n)^2 - 2) > lpf(prime(n)^2) = prime(n). It is possible only when prime(n)^2 - 2 is prime, i. e., prime(n) is in A062326. Add that prime(n)^2+1 is the smallest value of A242719(n).
Let A242720(n) = A242719(n) + 2*prime(n) + 2 = prime(n)^2 + 2*prime(n) + 3. Then, by the definition of A242720, we have lpf(prime(n)^2 + 2*prime(n) + 2) > lpf(prime(n)*(prime(n)+2)) >= prime(n). Thus prime(n) + 2 is prime, i.e., prime(n) is in A001359. Besides, lpf(prime(n)^2 + 2*prime(n) + 2) > prime(n), or lpf((prime(n)+1)^2 + 1) >= prime(n+1) = prime(n) + 2. So (prime(n)+1)^2+1 is prime, i.e., prime(n) is also in A157468.
Add that, for n>=3, N=prime(n)^2 + 2*prime(n) + 3 is the smallest possible value of A242720(n). Indeed, let prime(n)^2+1 <= N <= prime(n)^2 + 2*prime(n) + 2. Then prime(n)^2-2 <= N - 3 <= prime(n)^2 + 2*prime(n) - 1. Since it should be lpf(N-3) >= prime(n), then there are only two possibilities: N-3 = prime(n)^2 + prime(n) or N-3 = prime(n)^2. However, lpf(prime(n)^2 + prime(n)) = 2, while, although lpf(prime(n)^2) = prime(n), however, in this case, lpf(N-1) = lpf(prime(n)^2+2) = 3, n>=3, and, so the inequalities lpf(N-1) > lpf(N-3) >= prime(n) are impossible in the considered cases for n>=3. - Vladimir Shevelev, Sep 03 2014

Crossrefs

Extensions

More terms from Peter J. C. Moses, Sep 02 2014

A070155 Numbers k such that k-1, k+1 and k^2+1 are prime numbers.

Original entry on oeis.org

4, 6, 150, 180, 240, 270, 420, 570, 1290, 1320, 2310, 2550, 2730, 3360, 3390, 4260, 4650, 5850, 5880, 6360, 6780, 9000, 9240, 9630, 10530, 10890, 11970, 13680, 13830, 14010, 14550, 16230, 16650, 18060, 18120, 18540, 19140, 19380, 21600, 21840
Offset: 1

Views

Author

Labos Elemer, Apr 23 2002

Keywords

Comments

Essentially the same as A129293. - R. J. Mathar, Jun 14 2008
Solutions to the equation: A000005(n^4-1) = 8. - Enrique Pérez Herrero, May 03 2012
Terms > 6 are multiples of 30. Subsequence of A070689. - Zak Seidov, Nov 12 2012
{a(n)-1} is a subsequence of A157468; for n>1, {a(n)^2+2} is a subsequence of A242720. - Vladimir Shevelev, Aug 31 2014

Examples

			150 is a term since 149, 151 and 22501 are all primes.
		

Crossrefs

Programs

  • Maple
    select(n -> isprime(n-1) and isprime(n+1) and isprime(n^2+1), [seq(2*i,i=1..10000)]); # Robert Israel, Sep 02 2014
  • Mathematica
    Do[s=n; If[PrimeQ[s-1]&&PrimeQ[s+1]&&PrimeQ[1+s^2], Print[n]], {n, 1, 1000000}]
    Select[Range[22000],AllTrue[{#+1,#-1,#^2+1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 19 2014 *)
  • PARI
    is(k) = isprime(k-1) && isprime(k+1) && isprime(k^2+1); \\ Amiram Eldar, Apr 15 2024

Formula

For n>1, a(n)^2 = A242720(pi(a(n)-2)) - 2, where pi(n) is the prime counting function (A000720). - Vladimir Shevelev, Sep 02 2014

A246824 Numbers k for which A242720(k) = (prime(k)+1)^2 + 2.

Original entry on oeis.org

3, 35, 41, 52, 57, 81, 104, 209, 215, 343, 373, 398, 473, 477, 584, 628, 768, 774, 828, 872, 1117, 1145, 1189, 1287, 1324, 1435, 1615, 1634, 1653, 1704, 1886, 1925, 2070, 2075, 2123, 2171, 2193, 2425, 2449, 2605, 2633, 2934, 2948, 3019, 3194, 3273, 3533, 3552, 3685, 3758
Offset: 1

Views

Author

Vladimir Shevelev, Sep 04 2014

Keywords

Comments

By a comment in A246748, A242720(k) >= (prime(k)+1)^2 + 2, and equality is attained in this sequence.
Prime(a(n)) >= 5 and is in the intersection of A001359 and A157468.

Crossrefs

Programs

  • Mathematica
    lpf[n_] := FactorInteger[n][[1, 1]]; aQ[n_] := Module[{k=6}, While[PrimeQ[k-3] && PrimeQ[k-1] || lpf[k-1]<=lpf[k-3] || lpf[k-3]Amiram Eldar, Dec 10 2018 *)
  • PARI
    lpf(k) = factorint(k)[1, 1];
    f(n) = my(k=6); while((isprime(k-3) && isprime(k-1)) || lpf(k-1)<=lpf(k-3) || lpf(k-3)A242720
    isok(n) = f(n) == (prime(n)+1)^2 + 2; \\ Michel Marcus, Dec 10 2018
    
  • Python
    from sympy import prime, isprime, factorint
    A246824_list = [a for a, b in ((n, prime(n)+1) for n in range(3,10**3)) if (not (isprime(b**2-1) and isprime(b**2+1)) and (min(factorint(b**2+1)) > min(factorint(b**2-1)) >= b-1))] # Chai Wah Wu, Jun 03 2019

Extensions

a(40)-a(50) from b-file by Robert Price, Sep 08 2019

A238048 Square array A(n,k), n>=1, k>=1, read by antidiagonals, where column k is the increasing list of all primes p such that (p+k)^2+k is also prime.

Original entry on oeis.org

3, 7, 5, 5, 13, 13, 3, 7, 19, 19, 7, 11, 11, 31, 23, 5, 31, 13, 19, 37, 53, 3, 13, 43, 23, 47, 43, 73, 7, 5, 19, 67, 29, 59, 79, 83, 11, 13, 11, 29, 73, 31, 61, 97, 89, 3, 23, 43, 19, 59, 109, 41, 67, 103, 109, 13, 17, 29, 73, 23, 73, 157, 43, 71, 109, 149
Offset: 1

Views

Author

Alois P. Heinz, Feb 17 2014

Keywords

Comments

Prime 2 is not contained in this array.

Examples

			Column k=3 contains prime 47 because (47+3)^2+3 = 2503 is prime.
Square array A(n,k) begins:
   3,  7,  5,  3,   7,   5,  3,   7, ...
   5, 13,  7, 11,  31,  13,  5,  13, ...
  13, 19, 11, 13,  43,  19, 11,  43, ...
  19, 31, 19, 23,  67,  29, 19,  73, ...
  23, 37, 47, 29,  73,  59, 23,  79, ...
  53, 43, 59, 31, 109,  73, 29, 103, ...
  73, 79, 61, 41, 157,  83, 31, 109, ...
  83, 97, 67, 43, 163, 103, 41, 127, ...
		

Crossrefs

Column k=1 gives A157468.
Cf. A238086.

Programs

  • Maple
    A:= proc(n, k) option remember; local p;
          p:= `if`(n=1, 1, A(n-1, k));
          do p:= nextprime(p);
             if isprime((p+k)^2+k) then return p fi
          od
        end:
    seq(seq(A(n, 1+d-n), n=1..d), d=1..11);
  • Mathematica
    A[n_, k_] := A[n, k] = Module[{p}, For[p = If[n == 1, 1, A[n-1, k]] // NextPrime, True, p = NextPrime[p], If[PrimeQ[(p+k)^2+k], Return[p]]]]; Table[Table[A[n, 1+d-n], {n, 1, d}], {d, 1, 11}] // Flatten (* Jean-François Alcover, Jan 19 2015, after Alois P. Heinz *)

A343148 Numbers k such that A083266(k) is prime.

Original entry on oeis.org

2, 6, 10, 15, 21, 26, 28, 30, 35, 38, 39, 40, 42, 44, 45, 46, 51, 55, 60, 63, 68, 69, 70, 78, 84, 93, 95, 96, 102, 105, 106, 116, 123, 124, 126, 130, 135, 136, 138, 143, 146, 150, 153, 155, 166, 174, 176, 178, 201, 203, 205, 218, 219, 221, 222, 231, 232, 234, 236, 240, 244, 245, 246, 248, 249
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Apr 06 2021

Keywords

Comments

Includes 2*p for p in A157468.

Examples

			a(3) = 10 is a term because A083266(10) = 37 is prime.
		

Crossrefs

Programs

  • Maple
    f:= n -> numtheory:-sigma(n) + n*numtheory:-phi(n)/2 - 1:
    select(t -> isprime(f(t)), [$2..1000]);
  • Mathematica
    Select[Range[250], PrimeQ[DivisorSigma[1, #] + # EulerPhi[#]/2 - 1] &] (* Michael De Vlieger, Apr 07 2021 *)

A359185 Numbers k such that for any positive integers x,y, if x*y=k then (x+y)^2+1 is a prime number.

Original entry on oeis.org

1, 3, 5, 9, 13, 19, 23, 25, 39, 53, 55, 73, 83, 89, 109, 119, 133, 149, 155, 159, 169, 179, 203, 223, 229, 239, 263, 269, 283, 299, 305, 313, 339, 349, 383, 395, 419, 439, 443, 463, 469, 473, 543, 569, 593, 643, 653, 673, 689, 699, 703, 713, 739, 763, 859, 863, 889, 909
Offset: 1

Views

Author

Michel Lagneau, Dec 19 2022

Keywords

Comments

Conjecture: if a term k is a perfect square > 1, then sqrt(k) is in the sequence A236068 (Primes p such that f(f(p)) is prime, where f(z) = z^2 + 1).
The conjecture is false. A counterexample is 296147^2 = 87703045609 where 296147 = 47 * 6301. - Robert Israel, Mar 05 2024
The primes of the sequence are in A157468.
All terms except 1 are congruent to 3, 5 or 9 (mod 10). - Robert Israel, Mar 05 2024

Examples

			909 is in the sequence because 909 = 3^2*101 with 3 decompositions:
909 = 1*909 and (1+909)^2+1 = 910^2+1 = 828101 is prime;
909 = 3*303 and (3+303)^2+1 = 306^2+1 = 93637 is prime;
909 = 9*101 and (9+101)^2+1 = 110^2+1 = 12101 is prime.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local F;
      F:= select(t -> t^2 <= n, numtheory:-divisors(n));
      andmap(t -> isprime((t + n/t)^2+1), F)
    end proc:
    select(filter, [seq(i,i=1..1000,2)]); # Robert Israel, Mar 05 2024
  • Mathematica
    t={};Do[ds=Divisors[n];k=1;While[k<=(Length[ds]+1)/2&&(ok=PrimeQ[(ds[[k]]+ds[[-k]])^2+1]),k++];If[ok,AppendTo[t,n]],{n,1,2000}];t
  • PARI
    isok(k) = fordiv(k, d, if ((d<=k/d) && !isprime((d+k/d)^2+1), return(0));); return(1); \\ Michel Marcus, Dec 19 2022

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
Showing 1-8 of 8 results.