cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A181483 Number of powers of 2 which can be subtracted from 3^n to form primes.

Original entry on oeis.org

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
Offset: 1

Views

Author

Carl R. White, Oct 23 2010

Keywords

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

Examples

			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
		

Crossrefs

Programs

A181484 Numbers k such that no power of 2 can be subtracted from 3^k to make a prime.

Original entry on oeis.org

36, 40, 66, 124, 162, 170, 179, 182, 184, 198, 206, 212, 214, 230, 262, 288, 302, 356, 358, 368, 393, 402, 406, 448, 456, 468, 493, 546, 586, 666, 676, 683, 686, 690, 702, 718, 724, 738, 752, 760, 785, 844, 854, 862, 866, 870, 882, 884, 888, 904, 918, 980
Offset: 1

Views

Author

Carl R. White, Oct 23 2010

Keywords

Comments

Zeros of A181483, -1s of A180303.
Odd terms: 179, 393, 493, 683, 785, 1083, 1161, 1181, 1545, ..., . - Robert G. Wilson v, Oct 25 2010

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{k = 0, lmt = Floor@ Log[2, 3^n] +1, m = 3^n}, While[ k < lmt && !PrimeQ[m - 2^k], k++ ]; k == lmt]; Select[ Range@ 995, fQ] (* Robert G. Wilson v, Oct 25 2010 *)

Extensions

a(30) onwards from Robert G. Wilson v, Oct 25 2010
Name clarified by J. Lowell, Aug 21 2020
Showing 1-2 of 2 results.