login
A376339
Number of nonnegative k <= n such that 2^(n - k) + 3^k is prime.
0
1, 1, 2, 2, 4, 4, 0, 4, 7, 3, 0, 8, 4, 7, 0, 3, 10, 8, 0, 8, 4, 1, 0, 7, 2, 8, 0, 3, 8, 9, 0, 6, 8, 0, 0, 4, 2, 8, 0, 3, 6, 8, 0, 6, 6, 5, 0, 9, 3, 5, 0, 4, 6, 9, 0, 4, 6, 3, 0, 9, 3, 11, 0, 4, 10, 6, 0, 8, 11, 2, 0, 9, 3, 10, 0, 2, 9, 3, 0, 9, 6, 1, 0, 8, 6, 9, 0, 2, 10, 9, 0, 7, 8, 3, 0, 8, 5, 8, 0, 2, 6
OFFSET
0,3
EXAMPLE
a(0) = 1 because 2^(0 - 0) + 3^0 = 2^0 + 1 = 1 + 1 = 2 is prime.
MATHEMATICA
a[n_]:=Length[Select[Range[0, n], PrimeQ[2^(n-#)+3^#] &]]; Array[a, 101, 0] (* Stefano Spezia, Sep 22 2024 *)
PROG
(Magma) [#[k: k in [0..n] | IsPrime(2^(n-k)+3^k)]: n in [0..100]];
CROSSREFS
Sequence in context: A054529 A074934 A376908 * A089886 A324648 A071511
KEYWORD
nonn
AUTHOR
STATUS
approved