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.

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

A072180 Numbers k such that 2^k - k^2 is prime.

Original entry on oeis.org

5, 7, 9, 17, 19, 51, 53, 81, 83, 119, 189, 219, 227, 301, 455, 461, 623, 2037, 2221, 2455, 3547, 5515, 6825, 8303, 9029, 12103, 49989, 55525, 64773, 80307, 119087, 141915, 192023, 205933, 301683, 307407
Offset: 1

Views

Author

Daniel Gronau (Daniel.Gronau(AT)gmx.de), Jun 30 2002

Keywords

Comments

The numbers corresponding to k = 2037, 2221, 3547 and 5515 have been certified prime with Primo. - Rick L. Shepherd, Nov 10 2002
The remaining k's > 1000 correspond only to probable primes.
Certainly k must be odd. Let N(k) = 2^k - k^2. Additional restrictions come from the facts that 7 | N(k) if k is in {2, 4, 5, 6, 10, 15} mod 21 and 17 | N(k) if k is in {31, 57, 61, 71, 107, 109, 113, 131} mod 136. - Daniel Gronau, Jul 06 2002
Henri Lifchitz found the terms > 40000 in 2001 and 119087 in March 2002. - Hugo Pfoertner, Nov 16 2004

Crossrefs

Programs

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

Extensions

Edited and extended by Robert G. Wilson v, Jul 01 2002
More terms from Hugo Pfoertner, Nov 16 2004
More terms from Henri Lifchitz submitted by Ray Chandler, Mar 02 2007

A061119 Primes in the sequence n^2 + 2^n (A001580).

Original entry on oeis.org

3, 17, 593, 32993, 2097593, 8589935681
Offset: 1

Views

Author

Amarnath Murthy, Apr 21 2001

Keywords

Comments

p and p^2 + 2^p are both prime only for p=3. All positive n satisfy the congruence n=3 (mod 6). - Lekraj Beedassy, Sep 07 2004
For values of n, see A064539. - Lekraj Beedassy, Jan 01 2007
The next term has 605 digits. - Harvey P. Dale, Jul 19 2017

Examples

			a(3) = 593 = 2^9 + 9^2.
a(4) = 32993 = 2^15 + 15^2.
		

References

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

Crossrefs

Subsequence of A094133.

Programs

  • Mathematica
    Select[Table[n^2+2^n,{n,1000}],PrimeQ] (* Harvey P. Dale, Jul 19 2017 *)
  • PARI
    for(n=1,10^7, if(isprime(n^2+2^n),print(n^2+2^n)))

Formula

a(n) = A001580(A064539(n)). - Elmo R. Oliveira, Feb 18 2025

Extensions

More terms from Jason Earls, Aug 09 2001. Next term too large to include.

A099482 Semiprimes of the form 2^k - k^2.

Original entry on oeis.org

1927, 8023, 32543, 2096711, 8388079, 137438952103, 549755812367, 2199023253871, 8796093020359, 140737488353119, 562949953418911, 36028797018960943, 147573952589676408439, 37778931862957161703943
Offset: 1

Views

Author

Hugo Pfoertner, Oct 18 2004

Keywords

Examples

			a(2) = 8023 because 8023 = 71*113 = 2^13 - 13^2 = 2^A099481(2) - A099481(2)^2.
		

Crossrefs

Cf. A024012 2^n-n^2, A099481 2^k-k^2 is a semiprime, A072180 2^k-k^2 is prime, A075896 primes of the form 2^k-k^2.

Programs

  • Mathematica
    Select[Table[2^n - n^2, {n, 100}], PrimeOmega[#] == 2&] (* Vincenzo Librandi, Sep 21 2012 *)

A099481 Numbers k such that 2^k - k^2 is a semiprime.

Original entry on oeis.org

11, 13, 15, 21, 23, 37, 39, 41, 43, 47, 49, 55, 67, 75, 103, 105, 133, 147, 153, 161, 163, 177, 201, 209, 221, 239, 249, 263, 311, 335, 355, 397, 413, 421, 437, 447, 583, 617, 775, 807
Offset: 1

Views

Author

Hugo Pfoertner, Oct 18 2004

Keywords

Comments

The smaller prime factor of the 125-digit semiprime 2^413 - 413^2 has 40 digits; for the 127-digit semiprime 2^421 - 421^2 the smaller prime factor has 45 digits. The next term is >= 583. - Hugo Pfoertner, Oct 14 2007
The factorization of the 176-decimal-digit composite 2^583 - 583^2 using SNFS in YAFU took 55000 seconds on 4 cores of an i5-2400 CPU @ 3.10GHz. a(38) >= 617. - Hugo Pfoertner, Jul 23 2019
a(41) >= 827. - Hugo Pfoertner, Jul 26 2019

Examples

			a(1) = 11 because 2^11 - 11^2 = 1927 = 41*47.
		

Crossrefs

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

Extensions

More terms from Hugo Pfoertner, Oct 14 2007
a(37)-a(40) from Hugo Pfoertner, Jul 26 2019

A192515 Number of primes in the range [2^n-n^2, 2^n].

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 9, 10, 11, 15, 15, 16, 16, 18, 19, 20, 21, 23, 23, 31, 24, 34, 28, 27, 35, 32, 41, 38, 46, 45, 38, 44, 36, 49, 51, 43, 61, 33, 48, 58, 42, 62, 67, 59, 63, 70, 57, 63, 73, 68, 85, 74, 75, 73, 77, 86, 85, 74, 94, 89, 83, 89, 94, 93, 97, 102
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Jul 03 2011

Keywords

Examples

			a(0)=0 because [2^0-0^2, 2^0]=[1, 1],
a(1)=1 because 2 in range [2^1-1^2, 2^1]=[1, 2],
a(2)=2 because 2, 3 in range [2^2-2^2, 2^2]=[0, 4],
a(3)=4 because 2, 3, 5, 7 in range [2^3-3^2, 2^3]=[-1, 8],
a(4)=6 because 2, 3, 5, 7, 11, 13 in range [2^4-4^2, 2^4]=[0, 16],
a(5)=8 because 7, 11, 13, 17, 19, 23, 29, 31 in range [2^5-5^2, 2^5]=[7, 32].
		

Crossrefs

Programs

  • Maple
    A192515 := proc(n) a := 0 ; for i from 2^n-n^2 to 2^n do if isprime(i) then a := a+1 ; end if; end do; a ; end proc: # R. J. Mathar, Jul 11 2011
  • Mathematica
    Table[Count[Range[2^n - n^2, 2^n], p_ /; PrimeQ@ p], {n, 0, 65}] (* Michael De Vlieger, Apr 03 2016 *)
  • PARI
    a(n) = primepi(2^n) - primepi(2^n-n^2) + isprime(2^n-n^2); \\ Michel Marcus, Apr 03 2016

Extensions

Corrected and extended by R. J. Mathar, Jul 11 2011

A182360 Primes of the form 2^n - n^4.

Original entry on oeis.org

1902671, 33163807, 8588748671, 140737483475647, 562949947656511, 2251799806920047
Offset: 1

Views

Author

Alex Ratushnyak, Apr 26 2012

Keywords

Crossrefs

A222137 Primes of the form 2^p - p^2, where p is prime.

Original entry on oeis.org

7, 79, 130783, 523927, 9007199254738183, 9671406556917033397642519, 215679573337205118357336120696157045389097155380324579848828881942199
Offset: 1

Views

Author

Jaroslav Krizek, Feb 08 2013

Keywords

Comments

Subsequence of A075896 (primes of the form 2^n - n^2).
Primes of the form 2^p - p^2 (p = prime) for p = 5, 7, 17, 19, 53, 83, 227, 461, 2221,... (all p <= 2455).
a(8) = 59542628... has 139 digits.
a(9) = 2^2221 - 2221^2 has 669 digits.

Examples

			130783 is in the sequence because it is prime and it is of the form 2^p - p^2 where p=17 is prime.
		

Crossrefs

Cf. A075896.

Programs

  • Mathematica
    lst={}; Do[p=Prime[n]; If[PrimeQ[p=2^p-p^2], AppendTo[lst, p]], {n, 100}]; lst
Showing 1-8 of 8 results.