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.

A206854 Smallest integer m such that m is a product of 2n-1 consecutive primes and a sum of 2n-1 consecutive primes.

This page as a plain text file.
%I A206854 #10 Mar 14 2023 09:26:50
%S A206854 2,33263,2775683761181,52139749485151463,
%T A206854 31359251876786281892441299570699,2385018819218440287149,
%U A206854 23509572623777698757692123744388316389653416929069870587,436178570920976645136650311902311012102337977560516289614008518576769313,166345108784858794943225366868487068031523855419640057875257310044811
%N A206854 Smallest integer m such that m is a product of 2n-1 consecutive primes and a sum of 2n-1 consecutive primes.
%C A206854 n=1: m = 2 (trivial case: product and sum of single prime, 2);
%C A206854 n=2: m = 33263 = product{29, 31, 37} = sum{11083, 11087, 11093};
%C A206854 n=3: m = 2775683761181 = product({293, 307, 311, 313, 317}) = sum({555136752211, 555136752221, 555136752227, 555136752251, 555136752271});
%C A206854 n=4: m = 52139749485151463=product({229, 233, 239, 241, 251, 257, 263})= sum({7448535640735789, 7448535640735843, 7448535640735867, 7448535640735877, 7448535640735991, 7448535640736009, 7448535640736087});
%C A206854 n=5: m = 31359251876786281892441299570699 = product({3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191}) = sum({3484361319642920210271255507593, 3484361319642920210271255507619, 3484361319642920210271255507719, 3484361319642920210271255507767, 3484361319642920210271255507923, 3484361319642920210271255507937, 3484361319642920210271255507941, 3484361319642920210271255508067, 3484361319642920210271255508133});
%C A206854 n=6: m = 2385018819218440287149 = product({67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109}) = sum({216819892656221844131, 216819892656221844133, 216819892656221844139, 216819892656221844169, 216819892656221844307, 216819892656221844331, 216819892656221844347, 216819892656221844373, 216819892656221844397, 216819892656221844401, 216819892656221844421}).
%p A206854 scp:= proc(x,n) local P,i,s;
%p A206854   P:= Vector(n);
%p A206854   P[1]:= nextprime(ceil(x/n));
%p A206854   for i from 2 to n do P[i]:= nextprime(P[i-1]) od;
%p A206854   s:= convert(P,`+`);
%p A206854   while s > x do
%p A206854     s:= s - P[n];
%p A206854     P[2..n]:= P[1..n-1];
%p A206854     if P[2] = 2 then return false fi;
%p A206854     P[1]:= prevprime(P[2]);
%p A206854     s:= s + P[1];
%p A206854   od;
%p A206854   evalb(s=x)
%p A206854 end proc:
%p A206854 f:= proc(n) local i,P,r;
%p A206854      P:= <seq(ithprime(i),i=1..2*n-1)>;
%p A206854      r:= convert(P,`*`);
%p A206854      while not scp(r,2*n-1) do
%p A206854        r:= r/P[1];
%p A206854        P[1..2*n-2]:= P[2..2*n-1];
%p A206854        P[2*n-1]:= nextprime(P[2*n-2]);
%p A206854        r:= r*P[2*n-1];
%p A206854      od;
%p A206854 end proc:
%p A206854 f(1):= 2:
%p A206854 map(f, [$1..8]); # _Robert Israel_, Mar 13 2023
%Y A206854 Cf. A203619.
%K A206854 nonn
%O A206854 1,1
%A A206854 _Zak Seidov_, Feb 13 2012
%E A206854 a(7)-a(9) from _Robert Israel_, Mar 13 2023