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.

A130827 Least k >= 1 such that k^n + n is semiprime, or 0 if no such k exists.

Original entry on oeis.org

3, 2, 1, 3, 1, 7, 3, 1, 1, 11, 2, 7, 1, 1, 7, 3, 5, 23, 4, 1, 1, 3, 2, 1, 1, 21, 14, 11, 12, 7, 16, 1, 1, 1, 26, 37, 1, 1, 4, 21, 6, 31, 4, 25, 1, 71, 14, 1, 10, 1, 10, 371, 36, 1, 3, 1, 1, 185, 2, 43, 1, 49, 104, 1, 18, 205, 70, 1, 2, 33, 38, 541, 1, 105, 8, 1, 24, 395, 30, 3, 1, 71, 20, 1, 1, 1
Offset: 1

Views

Author

Zak Seidov, Aug 18 2007

Keywords

Comments

There exist values of n for which k^n + n is never prime (cf. A072883). Do there exist values of n for which k^n + n is never semiprime?
Compare with A361803, the equivalent sequence for k^n - n, where a generalized factorization (effectively a polynomial factorization) into 3 factors is given to show that k^n - n is never semiprime for certain n. - Peter Munn, Jun 19 2023

Examples

			a(1)=3 because 1^1 + 1 = 2 (prime) and 2^1 + 1 = 3 (prime) but 3^1 + 1 = 4 = 2*2 (semiprime).
a(2)=2 because 1^2 + 2 = 3 (prime) but 2^2 + 2 = 6 = 2*3 (semiprime).
a(3)=1 because 1^3 + 3 = 4 = 2*2 (semiprime).
a(4)=3 because 1^4 + 4 = 5 (prime) and 2^4 + 4 = 20 = 2^2 * 5 but 3^4 + 4 = 85 = 5*17 (semiprime).
a(5)=1 because 1^5 + 5 = 6 = 2*3 (semiprime).
		

Crossrefs

Cf. A097792 (n such that x^n+n is reducible), A072883 (least k >= 1 such that k^n+n is prime, or 0 if no such k exists).
Cf. A361803.

Programs

  • PARI
    a(n) = my(k=1); while (bigomega(k^n+n)!=2, k++); k; \\ Michel Marcus, Jun 19 2023

Extensions

More terms from Sean A. Irvine, Oct 20 2009