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

A246060 Number of primes of the form k^(n - m) - m^k where n > 2 and positive k, m.

Original entry on oeis.org

1, 1, 1, 5, 4, 5, 4, 7, 2, 8, 3, 10, 1, 12, 7, 13, 1, 11, 6, 13, 6, 19, 3, 12, 4, 17, 4, 10, 2, 18, 4, 15, 3, 21, 6, 14, 8, 18, 9, 23, 7, 9, 7, 21, 5, 13, 6, 22, 8, 16, 8, 24, 5, 22, 9, 12, 6, 26, 9, 26, 11, 27, 5, 30, 14, 34, 9, 23, 9, 48, 7, 11, 14, 37, 8, 32
Offset: 3

Views

Author

Juri-Stepan Gerasimov, Aug 23 2014

Keywords

Examples

			a(3) = 1 because 2^(3 - 1) - 1^2 = 3 is prime with k = 2 and m = 1;
a(4) = 1 because 2^(4 - 1) - 1^2 = 7 is prime with k = 2 and m = 1;
a(5) = 1 because 3^(5 - 2) - 2^3 = 19 is prime with k = 3 and m = 2.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(k=2, q, v=List([])); if(ispseudoprime(q=2^(n-1)-1), listput(v, q)); while(k^(n-2)>2^k, if(ispseudoprime(q=k^(n-2)-2^k), listput(v, q)); k++); for(m=3, n-2, for(t=2, k-1, if(ispseudoprime(q=t^(n-m)-m^t), listput(v, q)))); #Set(v); } \\ Jinyuan Wang, Feb 24 2020

Extensions

Definition and a(7) corrected by Colin Barker, Sep 01 2014
More terms from Jinyuan Wang, Feb 24 2020
Showing 1-1 of 1 results.