login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117430 Integer k such that 5^n + k = A117429(n). 2
3, -1, 0, -2, 1, 2, -2, -2, -2, -3, 2, 2, -2, -4, 4, 2, -8, -6, -2, -3, -2, -2, 4, 2, -6, -2, 4, 2, -3, 17, 9, -4, -8, -6, 12, 14, -2, -6, -8, -2, -6, 24, -2, 14, -6, -4, -18, -6, -3, -6, 16, -10, 16, -12, 12, -2, 16, 6, 16, -12, -2, -6, 12, -12, -8, -19, -6, 6, 24, -16, 4, 2, 16, -4, -8, -4, 16 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

(+/-) distance from 5^n to the nearest semiprime.

a(0)=3 and a(1)=-1 are the only terms == 3 (mod 4), as 5^n + 3 is divisible by 4. - Robert Israel, May 03 2018

LINKS

Robert Israel, Table of n, a(n) for n = 0..111

FORMULA

a(n) = Integer k such that 5^n + k = A117429(n). a(n) = A117429(n) - 5^n. a(n) = Min{k such that A001358(i) + k = 5^n}.

EXAMPLE

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

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

a(2) = 0 because 5^2 + 0 = 25 = A001358(9), no semiprime is closer to 5^2 [this is the only 0 element].

a(3) = -2 because 5^3 - 2 = 123 = 3 * 41 = A001358(42), no semiprime is closer.

a(4) = 1 because 5^4 + 1 = 626 = 2 * 313, no semiprime is closer.

a(5) = 2 because 5^5 + 2 = 3127 = 53 * 59, no semiprime is closer.

MAPLE

nsp:= proc(n) uses numtheory; local k;

  if bigomega(n)=2 then return n fi;

  for k from 1 do

    if n-k > 0 and bigomega(n-k)=2 then return n-k fi;

    if bigomega(n+k)=2 then return n+k fi

  od

end proc:

seq(nsp(5^n)-5^n, n=0..30); # Robert Israel, May 03 2018

MATHEMATICA

nsp[n_] := Module[{k}, If[PrimeOmega[n] == 2, Return[n]]; For[k = 1, True, k++, If[n-k > 0 && PrimeOmega[n-k] == 2, Return[n-k]]; If[PrimeOmega[n+k] == 2, Return[n+k]]]];

a[n_] := a[n] = nsp[5^n] - 5^n;

Table[Print[n, " ", a[n]]; a[n], {n, 0, 76}] (* Jean-Fran├žois Alcover, Jul 23 2020, after Maple *)

CROSSREFS

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

Sequence in context: A284826 A307752 A101548 * A143676 A002726 A119734

Adjacent sequences:  A117427 A117428 A117429 * A117431 A117432 A117433

KEYWORD

sign

AUTHOR

Jonathan Vos Post, Mar 14 2006

EXTENSIONS

More terms from Robert Israel, May 03 2018

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 November 30 15:27 EST 2020. Contains 338807 sequences. (Running on oeis4.)