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.

A118954 Numbers that cannot be written as 2^k + prime.

Original entry on oeis.org

1, 2, 16, 22, 26, 28, 36, 40, 46, 50, 52, 56, 58, 64, 70, 76, 78, 82, 86, 88, 92, 94, 96, 100, 106, 112, 116, 118, 120, 122, 124, 126, 127, 134, 136, 142, 144, 146, 148, 149, 154, 156, 160, 162, 166, 170, 172, 176, 178, 184, 186, 188, 190, 196, 202, 204, 206, 208
Offset: 1

Views

Author

Reinhard Zumkeller, May 07 2006

Keywords

Comments

A109925(a(n)) = 0.

Crossrefs

Complement of A118955. Subsequence of A118956. Supersequence of A006285.

Programs

  • Haskell
    a118954 n = a118954_list !! (n-1)
    a118954_list = filter f [1..] where
       f x = all (== 0) $ map (a010051 . (x -)) $ takeWhile (< x) a000079_list
    -- Reinhard Zumkeller, Jan 03 2014
    
  • Magma
    lst:=[]; for n in [1..208] do k:=-1; repeat k+:=1; a:=n-2^k; until a lt 1 or IsPrime(a); if a lt 1 then Append(~lst, n); end if; end for; lst; // Arkadiusz Wesolowski, Sep 02 2016
  • PARI
    is(n)=my(k=1);while(kCharles R Greathouse IV, Sep 01 2015
    

Formula

n < a(n) < kn for some k < 2 and all large enough n, see Romanoff and either Erdős or van der Corput. - Charles R Greathouse IV, Sep 01 2015