The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A081309 Smallest prime p such that n-p is a 3-smooth number, a(n)=0 if no such prime exists. 2
0, 0, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 5, 2, 3, 7, 5, 2, 3, 2, 3, 13, 5, 23, 7, 2, 3, 19, 2, 3, 7, 5, 17, 2, 3, 0, 5, 2, 3, 13, 5, 41, 7, 17, 13, 19, 11, 47, 13, 2, 3, 43, 5, 53, 7, 2, 3, 31, 5, 59, 7, 53, 31, 37, 11, 2, 3, 41, 5, 43, 7, 71, 19, 2, 3, 67, 5, 0, 7, 53, 17, 73, 2, 3, 13, 5, 23, 7, 17, 89 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(n)=0 iff A081308(n)=0.
EXAMPLE
a(25)=7: 25=7+2*3^2.
MATHEMATICA
smooth3Q[n_] := n/2^IntegerExponent[n, 2]/3^IntegerExponent[n, 3] == 1;
a[n_] := Module[{p}, For[p = 2, p < n, p = NextPrime[p], If[smooth3Q[n - p], Return[p]]]; 0];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 14 2021 *)
PROG
(Haskell)
a081309 n | null ps = 0
| otherwise = head ps
where ps = [p | p <- takeWhile (< n) a000040_list,
a065333 (n - p) == 1]
-- Reinhard Zumkeller, Jul 04 2012
CROSSREFS
Cf. A065333.
Sequence in context: A236531 A332334 A217403 * A329377 A010553 A262095
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Mar 17 2003
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 3 18:26 EDT 2024. Contains 373081 sequences. (Running on oeis4.)