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.

A004051 Primes of the form 2^a + 3^b.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 29, 31, 41, 43, 59, 67, 73, 83, 89, 97, 113, 131, 137, 251, 257, 283, 307, 337, 499, 521, 593, 733, 761, 857, 1033, 1051, 1753, 2129, 2203, 2251, 2699, 2777, 4099, 4177, 4339, 6563, 6569, 6577, 6689, 8219, 8273, 8609, 10657, 14753
Offset: 1

Views

Author

Keywords

Comments

Are a(3)=5, a(5)=11 and a(7)=17 the only cases with two ways of representation: {5=2^2+3^0=2^1+3^1, 11=2^3+3^1=2^1+3^2, 17=2^4+3^0=2^3+3^2}? - Zak Seidov, Feb 24 2015

Crossrefs

Cf. A010051, subsequence of A004050.

Programs

  • Haskell
    a004051 n = a004051_list !! (n-1)
    a004051_list = filter ((== 1) . a010051'') a004050_list
    -- Reinhard Zumkeller, May 20 2015
  • MATLAB
    n = 0; for a = 0:30 p1 = 2^a; for b = 0:19; p2 = 3^b; p3 = p1 + p2; if isprime(p3) n = n + 1; c(n) = p3; end; end; end; c = sort(c); k = size(c, 2); for i = 2:k if c(i-1) == c(i) c(i-1) = 0 end; end; c = sort(c); c = sym(c) % Lei Zhou, Jan 26 2005
    
  • Mathematica
    nMax = 15000; Union[Select[2^First[#] + 3^Last[#] & /@ Tuples[{Range[0, Log[2, nMax]], Range[0, Log[3, nMax]]}], # <= nMax && PrimeQ[#] &]]  (* Harvey P. Dale, Mar 13 2011 *)