login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117416 Semiprime nearest to 3^n. In case of a tie, choose the smaller. 4
4, 4, 9, 26, 82, 247, 731, 2186, 6559, 19679, 59047, 177149, 531439, 1594322, 4782979, 14348905, 43046722, 129140159, 387420493, 1162261465, 3486784399, 10460353201, 31381059597, 94143178823, 282429536489, 847288609441 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

See also: A117405 Semiprime nearest to 2^n. A117387 Prime nearest to 2^n.

LINKS

Table of n, a(n) for n=0..25.

FORMULA

a(n) = 3^n + A117416(n). a(n) = 3^n + Min{k such that A001358(i) + k = 3^n}.

EXAMPLE

a(0) = 4 because 3^0 + 3 = 4 = A001358(1) and no semiprime is closer to 3^0.

a(1) = 4 because 3^1 + 1 = 4 = A001358(1) and no semiprime is closer to 3^1.

a(2) = 9 because 3^2 + 0 = 9 = 3^2 = A001358(3), no semiprime is closer to 3^2.

a(3) = 26 because 3^3 - 1 = 26 = 2 * 13, no semiprime is closer.

a(4) = 82 because 3^4 + 1 = 82 = 2 * 41, no semiprime is closer.

a(5) = 247 because 3^5 + 4 = 247 = 13 * 19, no semiprime is closer.

MATHEMATICA

nsp[n_]:=Module[{c=3^n, a, b, j=1, k=1}, While[PrimeOmega[c-j]!=2, j++]; a=c-j; While[PrimeOmega[c+k]!=2, k++]; b=c+k; If[(b-c)<(c-a), b, a]]; Join[ {4, 4, 9}, Array[nsp, 30, 3]] (* Harvey P. Dale, Apr 11 2015 *)

CROSSREFS

Cf. A000079, A001358, A117387, A117405, A117406, A117416.

Sequence in context: A069549 A118069 A089539 * A174943 A173317 A059811

Adjacent sequences:  A117413 A117414 A117415 * A117417 A117418 A117419

KEYWORD

easy,nonn,less

AUTHOR

Jonathan Vos Post, Mar 13 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 11 10:48 EST 2018. Contains 318049 sequences. (Running on oeis4.)