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

A138694 Numbers n such that the set {2*n+p^2, p any prime} contains exactly one prime.

Original entry on oeis.org

1, 4, 7, 10, 16, 19, 22, 25, 31, 37, 40, 46, 49, 52, 61, 64, 70, 79, 82, 85, 91, 94, 109, 112, 115, 121, 124, 127, 130, 136, 142, 151, 154, 169, 172, 175, 187, 190, 196, 205, 211, 217, 220, 226, 229, 235, 241, 247, 250, 256, 274, 277, 280, 289, 292, 295, 304, 316
Offset: 1

Views

Author

Artur Jasinski, Mar 27 2008

Keywords

Comments

The sequence forms a subset of A016777, as explained below:
For each prime p<>3 we have p^2 =1 (mod 3), see A024700.
(i) For the k where 2*k=2 (mod 3), that is where k=1 (mod 3), this leads to 2*k+p^2=0 (mod 3), so the 2*k+p^2 are divisible by 3 (not prime) unless p=3.
The subcase where 2*k+3^2 is prime generates this sequence here; the subcase where it is not generates A138685.
(ii) For the k where 2*k=0 (mod 3), that is where k=0 (mod 3), one can select any p^2 =1 (mod 3)
to generate a prime 2*k+p^2 = 1 (mod 3), so these k generate many primes (of the form A002476).
(iii) For the k where 2*k=1 (mod 3), that is where k=2 (mod 3), one can select any p^2 =1 (mod 3)
to generate a prime 2*k+p^2 = 2 (mod 3), so these k generate many primes (of the form A003627).
The unique primes associated with each n are in A007528: n=1 associated with A007528(2)=11=2*1+3^2,
n=4 associated with A007528(3)=17=2*4+3^2 etc.

Examples

			3 is not in the sequence because {6+2^2, 6+3^3, 6+5^2, 6+7^2,..} = {10, 15, 31, 55,..,127,..,367,..}
contains the primes 31, 127, 367,..., generated with p=5,11,19...
4 is in the sequence because {8+2^2, 8+3^3, 8+5^2, 8+7^2,..} = {12, 17, 33, 57,...} contains
only one prime (that is, 17), generated with p=3.
		

Crossrefs

Programs

  • Mathematica
    b = {}; Do[a = {}; Do[If[PrimeQ[2*k + Prime[n]^2], AppendTo[a, k]], {n, 1, 100}]; If[Length[a] < 2, AppendTo[b, a]], {k, 1, 500}]; Union[Flatten[b]]

Formula

{This sequence here} Union {A138685} = {A016777}.

Extensions

Edited by R. J. Mathar, May 15 2009

A138691 Numbers of the form 68+p^2 (where p is a prime).

Original entry on oeis.org

72, 77, 93, 117, 189, 237, 357, 429, 597, 909, 1029, 1437, 1749, 1917, 2277, 2877, 3549, 3789, 4557, 5109, 5397, 6309, 6957, 7989, 9477, 10269, 10677, 11517, 11949, 12837, 16197, 17229, 18837, 19389, 22269, 22869, 24717, 26637, 27957, 29997
Offset: 1

Views

Author

Artur Jasinski, Mar 26 2008

Keywords

Comments

68 + p^2 is divisible by 3 for any prime p > 3. - M. F. Hasler

Crossrefs

Programs

  • Mathematica
    Table[2*34 + Prime[p + 1]^2, {p, 0, 100}]
    Prime[Range[50]]^2+68 (* Harvey P. Dale, Oct 19 2011 *)
  • PARI
    forprime(p=1, 1e2, print1(68+p^2, ", ")) \\ Felix Fröhlich, Jul 07 2014

A138692 Numbers of the form 86+p^2 (where p is a prime).

Original entry on oeis.org

90, 95, 111, 135, 207, 255, 375, 447, 615, 927, 1047, 1455, 1767, 1935, 2295, 2895, 3567, 3807, 4575, 5127, 5415, 6327, 6975, 8007, 9495, 10287, 10695, 11535, 11967, 12855, 16215, 17247, 18855, 19407, 22287, 22887, 24735, 26655, 27975, 30015
Offset: 1

Views

Author

Artur Jasinski, Mar 26 2008

Keywords

Comments

86+p^2 is divisible by 3, for any prime p>3. - M. F. Hasler

Crossrefs

Programs

  • Mathematica
    Table[2*43 + Prime[p + 1]^2, {p, 0, 100}]
    Prime[Range[40]]^2+86 (* Harvey P. Dale, Jan 31 2020 *)

A138693 Numbers of the form 110 + p^2. (where p is a prime).

Original entry on oeis.org

114, 119, 135, 159, 231, 279, 399, 471, 639, 951, 1071, 1479, 1791, 1959, 2319, 2919, 3591, 3831, 4599, 5151, 5439, 6351, 6999, 8031, 9519, 10311, 10719, 11559, 11991, 12879, 16239, 17271, 18879, 19431, 22311, 22911, 24759, 26679, 27999, 30039
Offset: 1

Views

Author

Artur Jasinski, Mar 26 2008

Keywords

Comments

110+p^2 is divisible by 3, for any prime p>3. - M. F. Hasler

Crossrefs

Programs

Formula

a(n) = 110 + A000040(n)^2. - Wesley Ivan Hurt, Sep 13 2014
a(n) = 110 + A001248(n). - Michel Marcus, Sep 14 2014

A138690 Numbers of the form 56+p^2 (where p is a prime).

Original entry on oeis.org

60, 65, 81, 105, 177, 225, 345, 417, 585, 897, 1017, 1425, 1737, 1905, 2265, 2865, 3537, 3777, 4545, 5097, 5385, 6297, 6945, 7977, 9465, 10257, 10665, 11505, 11937, 12825, 16185, 17217, 18825, 19377, 22257, 22857, 24705, 26625, 27945, 29985
Offset: 1

Views

Author

Artur Jasinski, Mar 26 2008

Keywords

Comments

56+p^2 is divisible by 3 for any prime p>3. - M. F. Hasler

Crossrefs

Programs

  • Mathematica
    Table[2*28 + Prime[p + 1]^2, {p, 0, 100}]
    Prime[Range[40]]^2+56 (* Harvey P. Dale, Dec 15 2015 *)

A240509 Least number k > 0 such that n^k - (n-1)^k - ... - 3^k - 2^k is prime, or 0 if no such k exists.

Original entry on oeis.org

1, 2, 2, 0, 0, 4, 5, 0, 0, 10, 27, 0, 0, 13, 18, 0, 0, 26, 57, 0, 0, 16, 35, 0, 0, 219, 19, 0, 0, 373, 48, 0, 0, 35, 33, 0, 0, 94, 93, 0, 0, 225, 47, 0, 0, 47, 223, 0, 0, 3227, 49, 0, 0, 199, 127, 0, 0, 45, 67, 0, 0, 65, 123, 0, 0, 103
Offset: 2

Views

Author

Derek Orr, Apr 06 2014

Keywords

Comments

a(n) = 0 if and only if n == 1 or 2 mod 4. This is because of the parity of the number given. For n = 1, 2, 5, 6, 9, 10, 13, 14,... any k-value will return an even number. Thus, it will never be prime. The only exception is for n = 1, where it will return 1, still not a prime. Further when n = 2, it only returns even numbers; however, 2 is a prime and thus, a(2) = 1.
A prime number is in the sequence A000040.
Next term a(68) is most likely > 5000.

Examples

			7^1 - 6^1 - 5^1 - 4^1 - 3^1 - 2^1 = -13 is not prime. 7^2 - 6^2 - 5^2 - 4^2 - 3^2 - 2^2 = -41 is not prime. 7^3 - 6^3 - 5^3 - 4^3 - 3^3 - 2^3 = -97 is not prime. 7^4 - 6^4 - 5^4 - 4^4 - 3^4 - 2^4 = 127 is prime. Thus, a(7) = 4.
		

Crossrefs

Programs

  • PARI
    a(n)=for(k=1,5000,if(ispseudoprime(n^k-sum(i=2,n-1,i^k)),return(k)));
    n=1; while(n<100,print1(a(n), ", ");n+=1)

A317887 Numbers k such that 4^k - 3^k + 2^k is prime.

Original entry on oeis.org

1, 2, 4, 18, 56, 60, 88, 1288, 1784, 3406, 9250, 11968, 36216, 57206, 89148, 107514, 155410, 202906
Offset: 1

Views

Author

Jinyuan Wang, Aug 09 2018

Keywords

Comments

1 is the only odd number in this sequence.
a(15) > 65432.
a(16) > 10^5. - Michael S. Branicky, Nov 21 2024

Examples

			2 is in the sequence since 4^2 - 3^2 + 2^2 = 16 - 9 + 4 = 11 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 5000], PrimeQ[4^# - 3^# + 2^#] &]
  • PARI
    for(n=1, 5000, if(ispseudoprime(4^n-3^n+2^n), print1(n, ", ")))

Extensions

a(13)-a(14) from Giovanni Resta, Aug 10 2018
a(15) from Michael S. Branicky, Nov 21 2024
a(16) from Georg Grasegger, Apr 07 2025
a(17)-a(18) from Georg Grasegger, May 06 2025
Showing 1-7 of 7 results.