OFFSET
1,1
COMMENTS
The first two terms that are not semiprimes, and their prime factorizations, are:
a(62) = 2*185^2 + 29 = 68479 = 31*47*47,
a(63) = 2*187^2 + 29 = 69967 = 31*37*61.
--
No number of the form 2^k*2 + 29 has any prime factor < 29, as can be proved by showing that 2*k^2 + 29 (mod p) takes only nonzero values for all primes p < 29:
+----+-----------------------------------------------+
| p | Residues modulo p of 2*k^2 + 29 |
+----+-----------------------------------------------+
| 2 | 1 |
| 3 | 1, 2 |
| 5 | 1, 2, 4 |
| 7 | 1, 2, 3, 5 |
| 11 | 2, 3, 4, 6, 7, 9 |
| 13 | 1, 3, 5, 8, 9, 10, 11 |
| 17 | 3, 4, 8, 10, 11, 12, 13, 14, 16 |
| 19 | 1, 3, 4, 5, 6, 9, 10, 12, 13, 18 |
| 23 | 1, 6, 7, 8, 9, 10, 12, 14, 15, 18, 19, 22 |
+----+-----------------------------------------------+
Idea and table from Jon E. Schoenfield.
Example of explanation:
if k ~ 0 (mod 3) then k^2 ~ 0 (mod 3), so 2*k^2 + 29 ~ 29 (mod 3) ~ 2 (mod 3);
if k ~ 1 (mod 3) or if k ~ 2 (mod 3) ~ -1 (mod 3), then k^2 ~ 1 (mod 3), so 2*k^2 + 29 ~ 31 (mod 3) ~ 1 (mod 3).
--
A number of the form 2*k^2 + 29 has the prime 29 as a factor iff k ~ 0 (mod 29).
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000.
FORMULA
a(n) = 2*(A007642(n))^2 + 29.
EXAMPLE
a(5) = 3071 = 37*83 = 2*39^2 + 29 is composite and of the form 2*k^2 + 29.
a(62) = 68479 = 31*47^2 = 2*185^2 + 29 is composite and of the form 2*k^2 + 29.
MATHEMATICA
Select[2*Range[150]^2 + 29, CompositeQ] (* Amiram Eldar, Apr 15 2022 *)
PROG
(Python)
from sympy import isprime
print([m for m in (2*k**2+29 for k in range(140)) if not isprime(m)]) # Michael S. Branicky, Apr 15 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémi Guillaume, Apr 10 2022
STATUS
approved