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!)
A058517 Positive even numbers not of the form prime + 3^x. 7

%I #17 Mar 07 2022 13:34:26

%S 2,36,66,78,96,120,126,144,156,162,186,204,210,216,222,276,288,300,

%T 306,324,328,330,336,342,366,372,378,396,408,414,426,438,456,474,486,

%U 498,516,528,534,540,546,552,562,576,582,606,612,624,630,636,666,672,690

%N Positive even numbers not of the form prime + 3^x.

%t Do[ i = 0; l = Ceiling[ N[ Log[ 3, n ] ] ]; While[ ! PrimeQ[ n - 3^i ] && i < l, i++ ]; If[ i == l, Print[ n ] ], {n, 2, 1000, 2} ]

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

%Y Cf. A006285, A156695, A350628-A350630, A350957, A350958, A282430 (subsequence).

%K nonn

%O 1,1

%A _Robert G. Wilson v_, Dec 21 2000

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 July 24 13:23 EDT 2024. Contains 374584 sequences. (Running on oeis4.)