login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A117417
Integer k such that 3^n + k = A117416(n).
0
3, 1, 0, -1, 1, 4, 2, -1, -2, -4, -2, 2, -2, -1, 10, -2, 1, -4, 4, -2, -2, -2, -12, -4, 8, -2, -7, 2, -2, 8, 14, -5, 1, -4, -8, -4, 16, 6, -6, -2, 2, -8, -2, 12, -2, -5, -8, 10, -2, 4, -10, 40, 8, -10, 4, -2, -34, -2, 4, -20, -2
OFFSET
0,1
COMMENTS
Distance from 3^n to the nearest semiprime. If there are two semiprimes at the same distance, take the negative k-value.
See also: A117405 Semiprime nearest to 2^n. A117387 Prime nearest to 2^n.
FORMULA
a(n) = Integer k such that 3^n + k = A117416(n). a(n) = A117416(n) - 3^n. a(n) = Min{k such that A001358(i) + k = 3^n}.
EXAMPLE
a(0) = 3 because 3^0 + 3 = 4 = A001358(1) and no semiprime is closer to 3^0.
a(1) = 1 because 3^1 + 1 = 4 = A001358(1) and no semiprime is closer to 3^1.
a(2) = 0 because 3^2 + 0 = 9 = 3^2 = A001358(3), no semiprime is closer to 3^2 [this is the only 0 element].
a(3) = -1 because 3^3 - 1 = 26 = 2 * 13, no semiprime is closer.
a(4) = 1 because 3^4 + 1 = 82 = 2 * 41, no semiprime is closer.
a(5) = 4 because 3^5 + 4 = 247 = 13 * 19, no semiprime is closer.
CROSSREFS
KEYWORD
easy,sign,less
AUTHOR
Jonathan Vos Post, Mar 13 2006
STATUS
approved