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!)
A181483 Number of powers of 2 which can be subtracted from 3^n to form primes 2
1, 2, 3, 3, 5, 2, 4, 3, 4, 3, 5, 1, 3, 2, 3, 4, 4, 1, 5, 2, 6, 4, 2, 1, 4, 1, 5, 2, 8, 1, 6, 1, 5, 3, 7, 0, 6, 3, 1, 0, 9, 1, 8, 8, 5, 1, 4, 4, 6, 1, 6, 1, 4, 3, 5, 3, 2, 2, 4, 2, 2, 3, 3, 5, 2, 0, 7, 1, 5, 2, 3, 4, 5, 2, 1, 4, 5, 1, 4, 1, 4, 5, 4, 3, 4, 2, 6, 1, 9, 3, 3, 2, 2, 2, 5, 2, 3, 1, 5, 1, 6, 3, 1, 5, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Note that if a 2^m is too large or too small, 3^n-2^m is either negative or fractional (respectively) and cannot ever be prime, thus 0 <= a(n) <= floor(n*log_2(3))
Zeros in this sequence are in A181484, which correspond to -1s in A180303
LINKS
EXAMPLE
3^1-2^0 = 2 which is prime, so a(1)=1
3^3-{2^4,2^3,2^2,2^1,2^0} = {11,19,23,25,26}, three of which are prime, so a(3) = 3
MATHEMATICA
np[n_]:=Module[{p2=2^Range[0, Floor[Log[2, 3^n]]]}, Count[3^n-p2, _?PrimeQ]]; Array[np, 110] (* Harvey P. Dale, Nov 06 2012 *)
CROSSREFS
Sequence in context: A341931 A341701 A049272 * A205130 A324799 A069461
KEYWORD
nonn
AUTHOR
Carl R. White, Oct 23 2010
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 10 03:52 EDT 2024. Contains 373253 sequences. (Running on oeis4.)