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!)
A282430 Even numbers not divisible by 3 which are not of the form p + 3^x with p prime. 6

%I #17 Sep 08 2022 08:46:18

%S 2,328,562,716,794,898,1084,1772,1808,1918,1924,1972,2186,2434,2564,

%T 2572,2894,2986,3056,3524,3578,3716,3868,4144,4304,4414,4714,4774,

%U 4838,4852,4924,5072,5098,5164,5204,5272,5338,5398,5456,5614,5708,5756,5968,5972,5974

%N Even numbers not divisible by 3 which are not of the form p + 3^x with p prime.

%C Sequence is infinite, since any integer congruent to 63064644938 modulo 195435717998430 cannot be the sum of a power of three and a prime.

%C A282432(a(n)) = 0.

%H Robert G. Wilson v, <a href="/A282430/b282430.txt">Table of n, a(n) for n = 1..1000</a>

%e 328 is in the sequence since 328 - 3^0 = 3*109, 328 - 3^1 = 5^2*13, 328 - 3^2 = 11*29, 328 - 3^3 = 7*43, 328 - 3^4 = 13*19, and 328 - 3^5 = 5*17 are all composite.

%t fQ[n_] := If[ Mod[n, 3] > 0, Block[{lmt = Log[3, n], x = 0}, While[x < lmt && !PrimeQ[n - 3^x], x++]; x > lmt], False]; Select[ 2Range@3000, fQ] (* _Robert G. Wilson v_, Feb 25 2017 *)

%o (Magma) lst:=[]; for n in [0..5974 by 2] do if not n mod 3 eq 0 then x:=-1; repeat x+:=1; p:=n-3^x; until p lt 2 or IsPrime(p); if p lt 2 then Append(~lst, n); end if; end if; end for; lst;

%o (PARI) isok(n) = {if (n % 2, 0, if (n % 3, lim = log(n)/log(3); for (k=0, lim, if (isprime(n - 3^k), return (0));); 1, 0););} \\ _Michel Marcus_, Feb 25 2017

%Y Cf. A282432.

%Y Intersection of A001651 and A058517. - _Michel Marcus_, Feb 25 2017

%K nonn,easy

%O 1,1

%A _Arkadiusz Wesolowski_, Feb 15 2017

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 April 19 08:39 EDT 2024. Contains 371782 sequences. (Running on oeis4.)