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

%I #23 Nov 13 2018 14:09:51

%S 0,3,14,58,250,994,4066,16174,65326,261934,1048366,4191994,16774906,

%T 67078834,268405426,1073711794,4294937266,17179358674,68718966226,

%U 274868207254,1099501928086,4398036811414,17592176344726,70368521084794,281474753617786,1125899683749754,4503599404277626

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

%H Erdős Pál, <a href="http://combinatorica.hu/~p_erdos/1989-29.pdf">"Ramanujan and I"</a> Number Theory, Madras 1987. Springer, Berlin, Heidelberg, 1989. 1-17.

%H Leo Moser, <a href="https://cms.math.ca/10.4153/CMB-1959-017-9">"On the product of the primes not exceeding n"</a>, Canad. Math. Bull. 2 (1959), 119 - 121.

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

%e 4^5 = 1024. The primes less than or equal to 5 are 2, 3, and 5. Then 2 * 3 * 5 = 30 and hence a(5) = 1024 - 30 = 994.

%p restart;

%p with(NumberTheory);

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

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

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

%o (PARI) a034386(n) = my(v=primes(primepi(n))); prod(i=1, #v, v[i]) \\ after _Charles R Greathouse IV_ in A034386

%o a(n) = 4^n - a034386(n) \\ _Felix Fröhlich_, Nov 04 2018

%Y Cf. A000302 (4^n), A034386 (n#), A319852.

%K nonn

%O 0,2

%A _Alonso del Arte_, Sep 29 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 March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)