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.

User: César Aguilera

César Aguilera's wiki page.

César Aguilera has authored 12 sequences. Here are the ten most recent ones:

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

Original entry on oeis.org

4, 12, 144, 33024, 2147549184, 9223372041149743104, 170141183460469231750134047789593657344, 57896044618658097711785492504343953926975274699741220483192166611388333031424
Offset: 0

Author

César Aguilera, Aug 31 2023

Keywords

Comments

a(n) is the long leg of the Pythagorean triangle whose short leg is the n-th Fermat number, A000215(n), and whose hypotenuse is a(n) + 1.
[A000215(n), a(n), a(n) + 1] is a primitive Pythagorean triple of the form [2*k + 1, 2*k^2 + 2*k, 2*k^2 + 2*k + 1] where k = A058891(n).

Crossrefs

Programs

  • Mathematica
    Table[2^(2^n) + 2^(2^(n + 1) - 1), {n, 0, 7}] (* Paul F. Marrero Romero, Jan 13 2024 *)
  • Python
    for n in range(0,8):
        print(2**(2**n)+2**(2**(n+1)-1))

Formula

a(n) = A000215(n) + A058891(n+1) - 1.
a(n) = sqrt(Integral_{x=1..A000215(n)} (x^3-x) dx).
a(n) = 2*A058891(n)^2 + 2*A058891(n).
sqrt(a(n) + (a(n)+1)) = sqrt((a(n)+1)^2 - a(n)^2) = A000215(n).

A253108 Numbers k such that (sum of k^2 through (k+2)^2) + (k+1)^2 is prime.

Original entry on oeis.org

2, 4, 6, 9, 14, 17, 20, 21, 25, 32, 34, 35, 40, 45, 49, 51, 52, 56, 60, 62, 65, 76, 80, 82, 86, 87, 89, 94, 95, 96, 100, 104, 105, 107, 112, 114, 115, 116, 117, 124, 126, 135, 137, 140, 145, 147, 151, 164, 167, 172, 174, 179, 180, 181, 182, 199, 200, 202, 205, 206, 207
Offset: 1

Author

César Aguilera, Dec 26 2014

Keywords

Comments

Sequence is related to the Legendre conjecture.
No terms == 3 mod 5 or == 1 mod 7 or 0 mod 11. - Robert Israel, Jun 24 2015

Examples

			For n=2, n+1=3, n+2=4: we have
Sum(n^2,(n+1)^2)=Sum(2^2,3^2)=Sum(4,9)=Sum(4+5+6+7+8+9)=39,
Sum((n+1)^2,(n+2)^2)=Sum(3^2,4^2)=Sum(9,16)=Sum(9+10+11+12+13+14+15+16)=100,
39+100=139,
139 is prime; hence 2 is a term.
		

Programs

  • Maple
    select(n -> isprime(4*n^3+14*n^2+20*n+11), [$1..1000]); # Robert Israel, Dec 28 2014
  • Mathematica
    Select[Range[250],PrimeQ[Total[Range[#^2,(#+2)^2]]+(#+1)^2]&] (* Harvey P. Dale, Aug 04 2022 *)
  • PARI
    for (n=1,1000,if(isprime(4*n^3+14*n^2+20*n+11),print1(n",")))

Extensions

a(47) corrected by Robert Israel, Jun 24 2015

A235986 Numbers n such that two of the primes between n^2 and (n+1)^2 add up to n^2+(n+1)^2 - 1.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60
Offset: 1

Author

César Aguilera, Jan 17 2014

Keywords

Comments

Up to 10^6, the numbers missing from the sequence are 1, 17, 19, 46, 58, 64, 67, 85, and 367. - Giovanni Resta, Feb 26 2014

Examples

			For n=2 n+1=3; primes between 4 and 9 are (5,7);4+9-1=12 and 5+7=12.
For n=3 n+1=4; primes between 9 and 16 are (11,13); 9+16-1=24 and 11+13=24.
For n=18 n+1=19; primes between 324 and 361 are (331,337,347,349,353,359);324+361-1=684 and 331+353=684.
		

Crossrefs

Programs

  • Mathematica
    ok[n_] := n>1 && Catch@Block[{p = NextPrime[n^2]}, While[p < (n+1)^2, If[PrimeQ[ 2*n*(n+1) - p], Throw@True, p = NextPrime@p]]; False]; Select[Range@100, ok] (* Giovanni Resta, Feb 26 2014 *)
  • PARI
    buildp(n) = {my(vp = []); forprime(p = n^2, (n+1)^2, vp = concat(vp, p);); vp;}
    issum(vp, n) = {my(summ = n^2+(n+1)^2 - 1); for (i = 1, #vp, for (j = i+1, #vp, if (vp[i]+vp[j] == summ, return (1)););); return (0);}
    isok(n) = my(vp = buildp(n)); issum(vp, n); \\ Michel Marcus, Jan 18 2014

A233348 Numbers n such that 3*n+2 and 3*n-2 are both prime for n multiple of 5 (A008587).

Original entry on oeis.org

5, 15, 35, 55, 65, 75, 105, 155, 205, 215, 225, 275, 285, 295, 365, 405, 435, 475, 495, 555, 565, 595, 625, 665, 695, 735, 765, 825, 895, 945, 985, 1055, 1085, 1115, 1155, 1205, 1225, 1265, 1315, 1335, 1385, 1505, 1595, 1605, 1645, 1745, 1805, 1835, 1885
Offset: 1

Author

César Aguilera, Dec 07 2013

Keywords

Examples

			For n=15; 3*15+2=47 and 3*15-2=43.
		

Crossrefs

Cf. A157834 (n such that 3n-2 and 3n+2 are both prime).

Programs

  • Mathematica
    Select[5*Range[500], PrimeQ[3 # + 2] && PrimeQ[3 # - 2] &] (* T. D. Noe, Dec 09 2013 *)

Formula

Intersection of A008587 and A157834.

A226567 Numbers k such that 2*k+1 is neither a square nor a prime.

Original entry on oeis.org

7, 10, 13, 16, 17, 19, 22, 25, 27, 28, 31, 32, 34, 37, 38, 42, 43, 45, 46, 47, 49, 52, 55, 57, 58, 59, 61, 62, 64, 66, 67, 70, 71, 72, 73, 76, 77, 79, 80, 82, 85, 87, 88, 91, 92, 93, 94, 97, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 115, 117, 118, 121
Offset: 1

Author

César Aguilera, Jun 13 2013

Keywords

Comments

The natural numbers A000027 that are not in A005097 and A046092.
A226567 = Complement(A000027, A005097, A046092). - Zak Seidov, Jul 08 2013

Examples

			a(2)=10 is a term because 2*10+1 = 21 is neither a square nor a prime.
		

Crossrefs

Programs

  • Maple
    remove(n -> issqr(2*n+1) or isprime(2*n+1), [$1..1000]); # Robert Israel, Jun 16 2017
  • Mathematica
    Select[Range[200], ! PrimeQ[2 # + 1] && ! IntegerQ[Sqrt[2 # + 1]] &] (* T. D. Noe, Jun 13 2013 *)

A227000 Numbers k such that (k+1)^2-k^2 and (k+1)^3-k^3 are both prime.

Original entry on oeis.org

1, 2, 3, 6, 9, 11, 14, 23, 30, 41, 48, 63, 74, 81, 86, 90, 95, 105, 119, 125, 128, 140, 153, 156, 158, 165, 179, 186, 191, 209, 216, 219, 224, 233, 245, 251, 296, 303, 308, 315, 321, 350, 354, 359, 375, 398, 405, 419, 429, 441, 443, 468, 485, 506, 524, 531, 543, 546, 576
Offset: 1

Author

César Aguilera, Jun 26 2013

Keywords

Examples

			n=23; n+1=24; 24^2-23^2=47 and 24^3-23^3=1657.
		

Programs

  • Mathematica
    Select[Range[576], PrimeQ[(# + 1)^2 - #^2] && PrimeQ[(# + 1)^3 - #^3] &] (* T. D. Noe, Jun 26 2013 *)
  • PARI
    forprime(p=3,1e3,n=p\2;if(isprime(3*n*(n+1)+1),print1(n", "))) \\ Charles R Greathouse IV, Jun 26 2013

A225943 The first member of a twin prime pair whose sum equals the sums of two consecutive smaller pairs of twin primes.

Original entry on oeis.org

17, 29, 71, 101, 659, 1091, 1301, 2081, 2111, 2381, 2591, 2969, 4241, 4271, 4649, 4721, 4931, 5441, 5519, 6689, 6761, 7589, 8219, 8999, 10331, 10859, 11159, 11717, 11969, 13001, 16451, 17657, 18521, 20231, 22277, 23039, 23909, 24179, 24917, 27479, 28571
Offset: 1

Author

César Aguilera, May 21 2013

Keywords

Comments

The sum of a given pair of twin primes can be represented as the sum of consecutive pairs of smaller twin primes.

Examples

			17 + 19 = (5 + 7) + (11 + 13).
		

Programs

  • Mathematica
    t = Select[2*Range[20000], PrimeQ[# - 1] && PrimeQ[# + 1] &]; Intersection[t, Rest[t] + Most[t]] - 1 (* T. D. Noe, Jun 13 2013 *)

Extensions

Extended by T. D. Noe, Jun 13 2013

A225078 Numbers n such that n^2+1 and (n+1)^2-2 are both prime.

Original entry on oeis.org

1, 2, 4, 6, 14, 20, 26, 36, 54, 74, 116, 120, 126, 130, 134, 160, 176, 204, 210, 230, 236, 256, 264, 284, 300, 314, 340, 386, 420, 440, 466, 490, 496, 544, 594, 636, 644, 714, 750, 760, 784, 816, 930, 950, 986, 1070, 1124, 1140, 1146, 1156, 1174, 1176, 1210
Offset: 1

Author

César Aguilera, Apr 26 2013

Keywords

Comments

Prime limits of the Legendré conjecture for a given n.

Examples

			n=2; n+1=3 ;n^2+1=5 and (n+1)^2-2=7.
n=490; n+1=491; n^2+1=240101 and (n+1)^2-2=241079.
		

Programs

  • Haskell
    import Data.Function (on)
    import Data.List (elemIndices)
    a225078 n = a225078_list !! (n-1)
    a225078_list = elemIndices 1 $
       zipWith ((*) `on` a010051') a002522_list a008865_list
    -- Reinhard Zumkeller, May 06 2013
  • Mathematica
    Select[Range[2000], PrimeQ[#^2 + 1] && PrimeQ[(# + 1)^2 - 2] &] (* T. D. Noe, May 06 2013 *)

A224363 Primes p such that there are no squares between p and the prime following p.

Original entry on oeis.org

2, 5, 11, 17, 19, 29, 37, 41, 43, 53, 59, 67, 71, 73, 83, 89, 101, 103, 107, 109, 127, 131, 137, 149, 151, 157, 163, 173, 179, 181, 191, 197, 199, 211, 227, 229, 233, 239, 241, 257, 263, 269, 271, 277, 281, 293, 307, 311, 313, 331, 337, 347, 349, 353, 367, 373
Offset: 1

Author

César Aguilera, Apr 04 2013

Keywords

Comments

Legendre's Conjecture states that there is a prime between n^2 and (n+1)^2 for every integer n > 0 and thus that between two adjacent primes there can be at most one square. As of April 2013, the conjecture is still unproved.
a(n) = A000040(A221056(n)). - Reinhard Zumkeller, Apr 15 2013

Examples

			5 is a term because there are no squares between the adjacent primes 5 and 7.
		

Crossrefs

Programs

  • Haskell
    a224363 = a000040 . a221056  -- Reinhard Zumkeller, Apr 15 2013
  • Mathematica
    Select[Prime[Range[60]], Floor[Sqrt[NextPrime[#]]] == Floor[Sqrt[#]] &] (* Giovanni Resta, Apr 10 2013 *)

Extensions

Corrected and edited by Giovanni Resta, Apr 10 2013

A216270 Numbers n such that n+(n+1), n^2+(n+1)^2, n+(n+1)^2, n^2+(n+1) are all prime.

Original entry on oeis.org

1, 2, 5, 14, 69, 99, 495, 1364, 1365, 2010, 2735, 3099, 3914, 4359, 4389, 5984, 6669, 8435, 9164, 10794, 12075, 15224, 15315, 16014, 16470, 17900, 20214, 20769, 21204, 23450, 24240, 26430, 26690, 27300, 29099, 35189, 38415, 38745, 42944, 47054, 48789, 50295
Offset: 1

Author

César Aguilera, Mar 15 2013

Keywords

Examples

			n=14:                               29│     │421
n+(n+1)=14+(14+1)=29                   14---196
n^2+(n+1)^2=196+225=421                │  X  │
n+(n+1)^2=14+225=239                   15---225        *15+225+1=241
n^2+(n+1)=196+15=211               211/        \239
.
n=5:                                  11│   │61
n+(n+1)=5+(5+1)=11                      5---25
n^2+(n+1)^2=25+36=61                    │ X │
n+(n+1)^2=5+36=41                       6---36          *6+36+1=43
n^2+(n+1)=25+6=31                    31/      \41
.
n=495:                             991│     │491041
n+(n+1)=495+496=991                   495---245025
n^2+(n+1)^2=491041                    │  X  │
n+(n+1)^2=246511                      496---246016
n^2+(n+1)=245521               245521/       \246511
.
They form the group:
o 1 2 3 (i)
1 0 3 2
2 3 1 0
3 2 0 1
.
For example, for n=99:
99   9801       0 1 2 3 (i)
100  10000
9801  99        1 0 3 2
10000 100
10000 100
99    9801      2 3 1 0
100  10000      3 2 0 1
9801 99
The sum of each column and the sum of each diagonal is a prime number.
		

References

  • Joong Fang, Abstract Algebra, Schaum, 1963, Page 76.

Programs

  • Mathematica
    Select[Range[51000],AllTrue[{#+(#+1),#^2+(#+1)^2,#+(#+1)^2, #^2+#+1}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 21 2017 *)
  • PARI
    is(n) = { isprime(n+(n+1)) & isprime(n^2+(n+1)^2) & isprime(n+(n+1)^2) & isprime(n^2+(n+1)); }
    for(n=1,10^6, if (is(n), print1(n,", ")));
    /* Joerg Arndt, Mar 26 2013 */