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!)
A319880 Difference between 2^n and the product of primes less than or equal to n. 0

%I #15 Nov 06 2018 03:00:55

%S 0,1,2,2,10,2,34,-82,46,302,814,-262,1786,-21838,-13646,2738,35506,

%T -379438,-248366,-9175402,-8651114,-7602538,-5505386,-214704262,

%U -206315654,-189538438,-155984006,-88875142,45342586,-5932822318,-5395951406,-198413006482

%N Difference between 2^n and the product of primes less than or equal to n.

%C This sequence shows 2^n is neither a lower bound nor an upper bound for the primorials.

%F a(n) = 2^n - n#, where n# is the product of primes less than or equal to n (A034386).

%F a(n) = A000079(n) - A034386(n) .

%p restart;

%p with(NumberTheory);

%p a := n -> 2^n-product(ithprime(i), i = 1 .. PrimeCounting(n)):

%p 0, seq(a(n), n = 1 .. 15); # _Stefano Spezia_, Nov 05 2018

%t Table[2^n - Times@@Select[Range[n], PrimeQ], {n, 0, 31}]

%o (PARI) a(n) = 2^n - prod(k=1, primepi(n), prime(k)); \\ _Michel Marcus_, Nov 05 2018

%Y Cf. A000079, A054850, A319852, A319857.

%K sign

%O 0,3

%A _Alonso del Arte_, Sep 30 2018

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 April 24 13:24 EDT 2024. Contains 371955 sequences. (Running on oeis4.)