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

A057900 Numbers k such that 3^k + k is prime.

Original entry on oeis.org

2, 8, 34, 1532, 18248
Offset: 1

Views

Author

Robert G. Wilson v, Nov 16 2000

Keywords

Comments

Note that if n > 2 and n+1 is prime then (by Fermat's theorem) n+1 divides 3^n+n.
If it exists, a(6) > 100000. - Hugo Pfoertner, Mar 01 2024

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 3^n + n ], Print[ n ] ], {n, 0, 3000} ]
    v={2}; Do[If[EvenQ[n]&&Mod[n, 3]!=0&&!PrimeQ[n+1]&&PrimeQ[3^n+n], v=Append[v, n]; Print[v]], {n, 3, 19000}]
    Select[Range[18500],PrimeQ[3^#+#]&] (* Harvey P. Dale, Jul 23 2013 *)
  • PARI
    is(n)=ispseudoprime(3^n+n) \\ Charles R Greathouse IV, May 22 2017

Extensions

18248 from Farideh Firoozbakht, Aug 21 2003

A129963 Primes of the form 4^k + k.

Original entry on oeis.org

5, 67, 262153, 1073741839, 18889465931478580854821, 1496577676626844588240573268701473812127674924007509, 118571099379011784113736688648896417641748464297615937576404566024103044751294597
Offset: 1

Views

Author

Cino Hilliard, Jun 10 2007, Aug 20 2007

Keywords

Comments

It is convenient, although not necessary, to let k be an odd number since k even => 4^k + k is even > 2.
Conjecture: sequence is infinite.
The next term (a(8)) has 126 digits. - Harvey P. Dale, Jun 05 2014

Examples

			For k = 3, 4^3 + 3 = 67 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[4^n+n,{n,1,251,2}],PrimeQ] (* Harvey P. Dale, Jun 05 2014 *)
  • PARI
    f(n) = for(x=1,n,y=2^x+x;if(isprime(y),print1(y",")))

Formula

a(n) = A158879(A057909(n)). - Amiram Eldar, Jul 04 2024

A382786 Numbers k such that 5^k + k is prime.

Original entry on oeis.org

7954, 22102, 33054, 135156
Offset: 1

Views

Author

Nico Puada, Apr 24 2025

Keywords

Comments

All terms must end in the digit 2, 4, 6 or 8, otherwise 5^k + k is divisible by 2 or 5, which is not prime. - Jakub Buczak, May 04 2025

Crossrefs

Programs

  • Mathematica
    Select[Range[35000], PrimeQ[5^# + #] &] (* Nico Puada, Apr 24 2025 *)

Extensions

a(4) corrected by Jakub Buczak, May 04 2025

A100663 Composite q such that 4^q + q is prime.

Original entry on oeis.org

9, 15, 85, 133, 225, 1233, 12793, 108889
Offset: 1

Views

Author

Cino Hilliard, Jan 12 2005

Keywords

Crossrefs

Composites in A057909.

Programs

  • Mathematica
    For[n = 1, n < 5000, n++, If[Not[PrimeQ[n]], If[PrimeQ[4^n + n], Print[n]]]] (Steinerberger)
    Select[Range[2,10000],!PrimeQ[#]&&PrimeQ[4^#+#]&] (* Harvey P. Dale, Mar 09 2014 *)
  • PARI
    \\ p^q + q is prime q not prime
    ptoqpq(p,n)= { local(x,y,q); for(q=6,n, if(q%2, if(!isprime(q), y=p^q+q; if(ispseudoprime(y),print1(q",")) ) ) ) }

Extensions

a(6) from Stefan Steinerberger, Jan 27 2006
a(7)-a(8) using A057909 from Michael S. Branicky, Jun 28 2024
Showing 1-4 of 4 results.