A276988 a(n) is the least k such that 10*k+prime(n) is composite.
1, 3, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1
Offset: 1
Keywords
Examples
For n=1, 10+2=3x4 so a(1)=1; For n=2, 13 and 23 are prime, but then 30+3=3x11 so a(2)=3; For n=3, 10+5=3x5 so a(3)=1; For n=4, 17 is prime, but then 20+7=3x9 so a(4)=2.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= proc(n) local p,k; p:= ithprime(n); for k from 1 do if not isprime(p+10*k) then return k fi od end proc: map(f, [$1..100]); # Robert Israel, Nov 04 2024
-
PARI
isc(n) = (n > 1) && !isprime(n); a(n) = my(k = 0, p = prime(n)); while(!isc(p+10*k), k++); k; \\ Michel Marcus, Sep 27 2016
Extensions
More terms from Michel Marcus, Sep 27 2016
Comments