OFFSET
1,1
COMMENTS
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10765 (terms <= 10^16)
FORMULA
Primes INTERSECTION {2^h 3^i 5^j 7^k +/-1 for h,i,j,k >= 0}.
EXAMPLE
23 is in the sequence as one of 23-1 = 22 = 2 * 11 and 23+1 = 24 = 2^3 * 3 is 7-smooth and 23 is prime. - David A. Corneth, Apr 19 2021
MATHEMATICA
mx = 2^10; t7 = Select[Sort[Flatten[Table[2^i * 3^j * 5^k * 7^l, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx]}, {k, 0, Log[5, mx]}, {l, 0, Log[7, mx]}]]], # <= mx &]; Union[Select[t7 + 1, PrimeQ], Select[t7 - 1, PrimeQ]] (* T. D. Noe, Nov 26 2012 *)
PROG
(PARI) is7smooth(n) = forprime(p = 2, 7, n /= p^valuation(n, p)); n==1
is(n) = isprime(n) && (is7smooth(n - 1) || is7smooth(n + 1)) \\ David A. Corneth, Apr 19 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Nov 25 2012
STATUS
approved