OFFSET
1,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Mar 17 2003
STATUS
approved