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!)
A303691 a(n) is the number of 3-smooth numbers k such that prime(n)-k is also a prime number, where prime(n) stands for the n-th prime. 1

%I #53 Jul 03 2018 22:41:36

%S 0,1,2,2,4,3,3,5,5,6,5,5,5,6,6,6,7,7,7,7,6,8,9,6,5,8,7,9,8,9,6,8,8,9,

%T 7,9,8,8,10,8,8,11,8,6,10,12,10,9,9,11,9,8,8,8,8,11,9,9,8,9,8,12,7,8,

%U 7,10,8,7,9,9,10,9,10,8,9,10,11,9,11,7,8,13

%N a(n) is the number of 3-smooth numbers k such that prime(n)-k is also a prime number, where prime(n) stands for the n-th prime.

%C Conjecture: a(n)>0 for all n>1.

%e List of 3-smooth numbers from A003586: 1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 27, 32, 36, 48, 54, 64, 72, 81, 96, 108, 128, ...

%e For n=2, the 2nd prime is 3, 3-1=2 is prime. This is the only case. So a(2)=1;

%e For n=3, the 3rd prime is 5, 5-2=3 and 5-3=2 are prime. So a(3)=2;

%e ...

%e For n=10, the 10th prime is 29, 29-6=23, 29-12=17, 29-16=13, 29-18=11, 29-24=5, and 29-27=2, 6 valid numbers found, so a(10)=6.

%t g = {1}; Table[p = Prime[n]; While[l = Length[g]; g[[l]] < p, pos = l + 1; While[pos--; c2 = g[[pos]]*2; c2 > g[[l]]]; c2 = g[[pos + 1]]*2; pos = l + 1; While[pos--; c3 = g[[pos]]*3; c3 > g[[l]]]; c3 = g[[pos + 1]]*3; c = Min[c2, c3]; AppendTo[g, c]]; ct = 0; i = 0; While[i++; cn = g[[i]]; cn < p, If[PrimeQ[p - cn], ct++]]; ct, {n, 1, 82}]

%o (PARI) is_a003586(n) = n<5||vecmax(factor(n, 5)[, 1])<5;

%o a(n) = my(p=prime(n)); sum(k=1, p, is_a003586(k) && isprime(p-k)); \\ _Michel Marcus_, Jul 03 2018

%Y Cf. A000040, A003586, A007694.

%K nonn,easy

%O 1,3

%A _Lei Zhou_, Jun 25 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 May 4 11:27 EDT 2024. Contains 372240 sequences. (Running on oeis4.)