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
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, 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, 7, 10, 8, 7, 9, 9, 10, 9, 10, 8, 9, 10, 11, 9, 11, 7, 8, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Conjecture: a(n)>0 for all n>1.
LINKS
EXAMPLE
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, ...
For n=2, the 2nd prime is 3, 3-1=2 is prime. This is the only case. So a(2)=1;
For n=3, the 3rd prime is 5, 5-2=3 and 5-3=2 are prime. So a(3)=2;
...
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.
MATHEMATICA
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}]
PROG
(PARI) is_a003586(n) = n<5||vecmax(factor(n, 5)[, 1])<5;
a(n) = my(p=prime(n)); sum(k=1, p, is_a003586(k) && isprime(p-k)); \\ Michel Marcus, Jul 03 2018
CROSSREFS
Sequence in context: A147594 A305425 A212652 * A205678 A128590 A143228
KEYWORD
nonn,easy
AUTHOR
Lei Zhou, Jun 25 2018
STATUS
approved

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 17:10 EDT 2024. Contains 371962 sequences. (Running on oeis4.)