A223175 Smallest prime q such that 2n+1 = p + 8*q for some odd prime p, or 0 if no such prime exists.
0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 2, 2, 3, 2, 2, 3, 2, 3, 3, 2, 2, 0, 5, 2, 3, 2, 2, 3, 2, 3, 3, 2, 3, 7, 2, 2, 7, 5, 2, 3, 2, 2, 3, 5, 2, 3, 2, 5, 3, 2, 3, 7, 5, 2, 7, 2, 2, 3, 2, 2, 3, 2, 3, 3, 7, 3, 7, 5, 2, 7, 2, 5, 3, 2, 2, 7, 7, 3, 3, 2, 2, 7, 5, 2
Offset: 0
Keywords
Examples
a(14) = 2 because, for q=2 the corresponding p=13 and 13+8*2 = 29 is prime.
Links
- Michel Lagneau, Table of n, a(n) for n = 0..10000
Programs
-
Maple
for n from 1 by 2 to 200 do:jj:=0:for j from 1 to 1000 while (jj=0) do:q:=ithprime(j):p:=n-8*q:if p> 0 and type(p, prime)=true then jj:=1:printf(`%d, `, q):else fi:od:if jj=0 then printf(`%d, `, 0):else fi:od:
Comments