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

A249945 a(n) = n! + 3^n.

Original entry on oeis.org

2, 4, 11, 33, 105, 363, 1449, 7227, 46881, 382563, 3687849, 40093947, 479533041, 6228615123, 87183074169, 1307688716907, 20922832934721, 355687557236163, 6402374093148489, 121645101571093467, 2432902011663424401, 51090942182169793203, 1124000727808988739609
Offset: 0

Views

Author

Max Alweiss, Nov 08 2014

Keywords

Crossrefs

Programs

Formula

a(n) = n! + 3^n.
a(n) = A000142(n) + A000244(n).
E.g.f.: 1/(1-x) + exp(3*x). - Alois P. Heinz, Aug 29 2022

A261714 Numbers n such that n! + 2^n + 1 is prime.

Original entry on oeis.org

0, 2, 4, 8, 72
Offset: 1

Views

Author

Altug Alkan, Aug 29 2015

Keywords

Comments

Inspired by A007611.
First three prime numbers of the form n! + 2^n +1 with positive n value are 7, 41, 40577.
a(5) > 30000. - Giovanni Resta, Aug 30 2015

Examples

			For n=2, n! + 2^n + 1 = 2! + 2^2 + 1 = 7, which is prime.
		

Crossrefs

Cf. A007611.

Programs

  • Magma
    [n: n in [1..300] | IsPrime(Factorial(n)+2^n+1)]; // Vincenzo Librandi, Aug 30 2015
    
  • Mathematica
    Select[Range@ 2000, PrimeQ[#! + 2^# + 1] &] (* Michael De Vlieger, Aug 29 2015 *)
  • PARI
    for(n=1, 1e3, if(isprime(k=(n!+2^n+1)), print1(n", ")))
    
  • PFGW
    ABC2 $a! + 2^$a + 1
    a: from 0 to 30000
    Charles R Greathouse IV, Sep 08 2015

A263469 Numbers k such that k! + 2^k + 3 or k! + 2^k - 3 is prime.

Original entry on oeis.org

0, 2, 3, 4, 5, 6, 7, 15, 17, 21, 42, 57, 99, 312, 372, 15030
Offset: 1

Views

Author

Altug Alkan, Oct 19 2015

Keywords

Comments

Both k! + 2^k + 3 and k! + 2^k - 3 are prime for k = 3 or 4. Are there any others?
No more terms below 10^4. - Charles R Greathouse IV, Nov 17 2015

Examples

			For k = 0, k! + 2^k + 3 = 0! + 2^0 + 3 = 5, which is prime.
For k = 2, k! + 2^k - 3 = 2! + 2^2 - 3 = 3, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 10^3], Or[PrimeQ[#! + 2^# + 3], PrimeQ[#! + 2^# - 3]] &] (* Michael De Vlieger, Oct 20 2015 *)
  • PARI
    for(n=0, 1e3, if(isprime(n!+2^n-3) || isprime(n!+2^n+3), print1(n", ")))
    
  • PARI
    is(n)=my(N=n!+2^n); ispseudoprime(N-3) || ispseudoprime(N+3) \\ Charles R Greathouse IV, Nov 17 2015

Extensions

a(14)-a(15) from Michael De Vlieger, Oct 20 2015
a(16) from Michael S. Branicky, Jul 25 2024

A263482 Numbers k such that k! + 2^k + 11 or k! + 2^k - 11 is prime.

Original entry on oeis.org

0, 2, 3, 4, 5, 6, 7, 9, 15, 34, 41, 79, 99, 379, 2183
Offset: 1

Views

Author

Altug Alkan, Oct 19 2015

Keywords

Comments

Is there some k such that k! + 2^k + 11 and k! + 2^k - 11 are prime?
a(16) > 20000. - Michael S. Branicky, Jul 25 2024

Examples

			For k = 0, k! + 2^k + 11 = 0! + 2^0 + 11 = 13, which is prime.
For k = 3, k! + 2^k - 11 = 3! + 2^3 - 11 = 3, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 400], Or[PrimeQ[#! + 2^# + 11], PrimeQ[#! + 2^# - 11]] &] (* Michael De Vlieger, Nov 17 2015 *)
    Select[Range[0,500],AnyTrue[#!+2^#+{11,-11},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 05 2019 *)
  • PARI
    for(n=0, 1e3, if(isprime(n!+2^n-11) || isprime(n!+2^n+11), print1(n", ")))
    
  • PARI
    is(n)=my(N=n!+2^n); ispseudoprime(N-11) || ispseudoprime(N+11) \\ Charles R Greathouse IV, Nov 17 2015

Extensions

a(14) from Charles R Greathouse IV, Nov 17 2015
a(15) from Michael S. Branicky, Jun 17 2023

A269833 Numbers n such that 2^n + n! is the sum of 2 squares.

Original entry on oeis.org

0, 4, 6, 8, 16, 20, 21, 40, 45, 47, 52, 64, 67, 71, 72, 74, 88
Offset: 1

Views

Author

Altug Alkan, Mar 06 2016

Keywords

Comments

Integers n such that the equation 2^n + n! = x^2 + y^2 where x and y are integers is solvable.
4, 8, 16 and 64 are powers of 2. What is the next power of 2 (if any) in this sequence?
103 <= a(18) <= 108. 108, 117, 144, 176, 254, 537 are terms. - Chai Wah Wu, Jul 22 2020

Examples

			6 is a term because 2^6 + 6! = 28^2.
8 is a term because 2^8 + 8! = 24^2 + 200^2.
21 is a term because 2^21 + 21! = 1222129664^2 + 7042537984^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 64], SquaresR[2, 2^# + #!] > 0 &] (* Michael De Vlieger, Mar 07 2016 *)
  • PARI
    isA001481(n) = #bnfisintnorm(bnfinit(z^2+1), n);
    for(n=0, 1e2, if(isA001481(n!+2^n), print1(n, ", ")));
    
  • Python
    from math import factorial
    from itertools import count, islice
    from sympy import factorint
    def A269833_gen(): # generator of terms
        return filter(lambda n:all(p & 3 != 3 or e & 1 == 0 for p, e in factorint((1<A269833_list = list(islice(A269833_gen(),9)) # Chai Wah Wu, Jun 27 2022

Extensions

a(17) from Chai Wah Wu, Jul 22 2020

A308090 a(n) = gcd(2^n + n!, 3^n + n!, n+1).

Original entry on oeis.org

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

Views

Author

Pedro Caceres, May 11 2019

Keywords

Comments

From observation: For n > 3, if n+1 is prime, then a(n) = n+1.
This implies that (2^n + n!)= 0 mod (n+1) iff (n+1) is prime, and (3^n + n!)= 0 mod (n+1) iff (n+1) is prime.
Conjecture: Conversely, if gcd(2^n + n!, 3^n + n!, n+1) = n+1, then n+1 is prime.
Appears to be the same as A090585(n) except at n=2. - R. J. Mathar, Jul 22 2021

Examples

			a(4) = gcd(2^4 + 4!, 3^4 + 4!, 5) = gcd(40, 105, 5) = 5.
a(5) = gcd(2^5 + 5!, 3^5 + 5!, 6) = gcd(152, 363, 6) = 1.
		

Crossrefs

Programs

  • Mathematica
    Table[GCD[2^n+n!,3^n+n!,n+1],{n,100}] (* Harvey P. Dale, Aug 27 2020 *)
  • PARI
    a(n) = gcd([2^n + n!, 3^n + n!, n+1]); \\ Michel Marcus, May 12 2019

Formula

a(n) = gcd(A007611(n), A249945(n), n+1).
Showing 1-6 of 6 results.