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-10 of 19 results. Next

A024012 a(n) = 2^n - n^2.

Original entry on oeis.org

1, 1, 0, -1, 0, 7, 28, 79, 192, 431, 924, 1927, 3952, 8023, 16188, 32543, 65280, 130783, 261820, 523927, 1048176, 2096711, 4193820, 8388079, 16776640, 33553807, 67108188, 134216999, 268434672, 536870071, 1073740924, 2147482687, 4294966272, 8589933503, 17179868028, 34359737143
Offset: 0

Views

Author

Keywords

Comments

The sequence 2^(n-2) - (n-2)^2, n=7,8,... enumerates the number of non-isomorphic sequences of length n, with entries from {1,2,3} and no two adjacent entries the same, that contain each of the thirteen rankings of three players (111, 121, 112, 211, 122, 212, 221, 123, 132, 213, 231, 312, 321) as embedded order isomorphic subsequences. See the arXiv paper below for proof. If n=7, these sequences are 1213121, 1213212, 1231213, 1231231,1231321, 1232123, and 1232132, and for each case, there are 3!=6 isomorphs. - Anant Godbole, Feb 20 2013

References

  • GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.

Crossrefs

Cf. A072180 (2^n - n^2 is prime), A075896 (primes of the form 2^n - n^2), A099481 (2^n - n^2 is a semiprime), A099482 (semiprimes of the form 2^n - n^2).

Programs

Formula

G.f.: (1 - 4*x + 4*x^2 + x^3)/((1 - 2*x)*(1 - x)^3). - Vincenzo Librandi, Jul 13 2012
a(n) = 5*a(n - 1) - 9*a(n - 2) + 7*a(n - 3) - 2*a(n - 4). - Vincenzo Librandi, Jul 13 2012

Extensions

More terms from Hugo Pfoertner, Oct 18 2004

A075896 Primes of the form 2^k - k^2.

Original entry on oeis.org

7, 79, 431, 130783, 523927, 2251799813682647, 9007199254738183, 2417851639229258349405791, 9671406556917033397642519, 664613997892457936451903530140158127, 784637716923335095479473677900958302012794430558004278391
Offset: 1

Views

Author

Zak Seidov, Oct 17 2002

Keywords

Crossrefs

Primes in A024012.

Programs

  • Magma
    [a: n in [1..200] | IsPrime(a) where a is 2^n-n^2]; // Vincenzo Librandi, Dec 07 2011
  • Mathematica
    Select[Table[2^n - n^2, {n, 500}], PrimeQ] (* Vincenzo Librandi, Dec 07 2011 *)
  • PARI
    for(n=2,10^7,if(isprime(2^n-n^2),print1(2^n-n^2",")))
    

Formula

a(n) = A024012(A072180(n)). - Elmo R. Oliveira, Feb 18 2025

Extensions

More terms from Ralf Stephan, Mar 30 2003

A122003 Numbers n such that A024152(n) = 12^n - n^12 is prime.

Original entry on oeis.org

1, 13, 25, 325, 833, 2087, 29773
Offset: 1

Views

Author

Alexander Adamchuk, Sep 12 2006

Keywords

Comments

Corresponding primes of the form A024152[n] = 12^n - n^12 are {11,83695120256591,953962166381085484825907807,...}.
a(8) > 50000. - Michael S. Branicky, Oct 01 2024

Crossrefs

Programs

  • Mathematica
    Do[f=12^n-n^12;If[PrimeQ[f],Print[{n,f}]],{n,1,833}]
  • PARI
    is(n)=isprime(12^n-n^12) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

a(6) from Robert G. Wilson v, Sep 14 2006
a(7) from Donovan Johnson, Feb 26 2008

A128447 Numbers k such that absolute value of 7^k - k^7 is prime.

Original entry on oeis.org

2, 6, 20, 24, 18582, 20366
Offset: 1

Views

Author

Alexander Adamchuk, Mar 03 2007

Keywords

Comments

From the Lifchitz link: 116240, 188858, and 230492 are also terms. - Michael S. Branicky, Jul 29 2024

Crossrefs

Programs

Extensions

a(5) and a(6) from Donovan Johnson, Mar 03 2008

A128448 Numbers k such that 8^k - k^8 is prime.

Original entry on oeis.org

1, 11, 89, 201, 977, 1351, 3869, 60681
Offset: 1

Views

Author

Alexander Adamchuk, Mar 03 2007

Keywords

Comments

From the Lifchitz link: 60681 and 85349 are also in this sequence. - Robert Price, Mar 27 2019

Crossrefs

Programs

Extensions

a(6) and a(7) from Donovan Johnson, Feb 26 2008
a(8) confirmed (no intervening terms) by Michael S. Branicky, Jul 29 2024

A128449 Numbers k such that absolute value of 9^k - k^9 is prime.

Original entry on oeis.org

2, 10, 50, 7900, 18494, 23840, 36838
Offset: 1

Views

Author

Alexander Adamchuk, Mar 03 2007

Keywords

Comments

Three larger terms 18494, 23840 and 36838 found by Donovan Johnson, Jul-Aug 2005.
From the Lifchitz link: 83024 is also a term. - Michael S. Branicky, Jul 29 2024

Crossrefs

Programs

Extensions

a(4)-a(6) from Ryan Propper, Feb 22 2008
a(7) from Donovan Johnson, Feb 26 2008

A128450 Numbers k such that absolute value of 10^k - k^10 is prime.

Original entry on oeis.org

3, 9, 273, 399
Offset: 1

Views

Author

Alexander Adamchuk, Mar 03 2007

Keywords

Comments

a(5) > 10^5 if it exists. - Michael S. Branicky, Nov 27 2024

Crossrefs

Programs

A128451 Numbers k such that the absolute value of 11^k - k^11 is prime.

Original entry on oeis.org

8, 14, 80, 212, 230, 1352, 13674, 16094, 44772
Offset: 1

Views

Author

Alexander Adamchuk, Mar 03 2007

Keywords

Comments

Two larger terms 13674 and 16094 found by Donovan Johnson, Jul 2005.

Crossrefs

Programs

Extensions

a(6)-a(8) from Donovan Johnson, Feb 26 2008
a(9) discovered by Serge Batalov, entered by Robert Price, Apr 11 2019

A123206 Primes of the form x^y - y^x, for x,y > 1.

Original entry on oeis.org

7, 17, 79, 431, 58049, 130783, 162287, 523927, 2486784401, 6102977801, 8375575711, 13055867207, 83695120256591, 375700268413577, 2251799813682647, 9007199254738183, 79792265017612001, 1490116119372884249
Offset: 1

Views

Author

Alexander Adamchuk, Oct 04 2006

Keywords

Comments

These are the primes in A045575, numbers of the form x^y - y^x, for x,y > 1. This includes all primes from A122735, smallest prime of the form (n^k - k^n) for k>1.
If y=1 was allowed, any prime p could be obtained for x=p+1. This motivates to consider sequence A243100 of primes of the form x^(y+1)-y^x. - M. F. Hasler, Aug 19 2014

Examples

			The primes 6102977801 and 1490116119372884249 are of the form 5^y-y^5 (for y=14 and y=26) and therefore members of this sequence. The next larger primes of this form would have y > 4500 and would be much too large to be included. - _M. F. Hasler_, Aug 19 2014
		

Crossrefs

Programs

  • Maple
    N:= 10^100: # to get all terms <= N
    A:= NULL:
    for x from 2 while x^(x+1) - (x+1)^x <= N do
       for y from x+1 do
          z:= x^y - y^x;
          if z > N then break
          elif z > 0 and isprime(z) then A:=A, z;
          fi
    od od:
    {A}; # Robert Israel, Aug 29 2014
  • Mathematica
    Take[Select[Intersection[Flatten[Table[Abs[x^y-y^x],{x,2,120},{y,2,120}]]],PrimeQ[ # ]&],25]
    nn=10^50; n=1; t=Union[Reap[While[n++; k=n+1; num=Abs[n^k-k^n]; num0&&PrimeQ[#]&]],nn]] (* Harvey P. Dale, Nov 23 2013 *)
  • PARI
    a=[];for(S=1,199,for(x=2,S-2,ispseudoprime(p=x^(y=S-x)-y^x)&&a=concat(a,p)));Set(a) \\ May be incomplete in the upper range of values, i.e., beyond a given S=x+y, a larger S may yield a smaller prime (for small x). - M. F. Hasler, Aug 19 2014

A064539 Numbers n such that 2^n + n^2 is prime.

Original entry on oeis.org

1, 3, 9, 15, 21, 33, 2007, 2127, 3759, 29355, 34653, 57285, 99069, 1933695
Offset: 1

Views

Author

Jason Earls, Oct 16 2001

Keywords

Comments

Values 2^2007+2007^2, 2^2127+2127^2, 2^3759+3759^2 were proved prime with Primo.
n is always an odd multiple of 3 (except for the first term), i.e., a(n) is a subsequence of A016945. - Lekraj Beedassy, Jan 01 2007
Some of the results were computed using the PrimeFormGW (PFGW) primality-testing program. - Hugo Pfoertner, Nov 14 2019

References

  • J.-M. De Koninck & A. Mercier, 1001 Problemes en Theorie Classique Des Nombres, Problem 165 pp. 30, 160, Ellipses Paris 2004.

Crossrefs

Programs

  • PARI
    for(n=1,5000, if(isprime(2^n+n^2),print(n)))

Extensions

a(10)-a(13) from Hugo Pfoertner, Jun 26 2004
a(14) from Ryan Propper, May 11 2023. n=1933695 corresponds to a probable prime with 582101 digits, and was PRP tested with PFGW.
Showing 1-10 of 19 results. Next