A211189 Number of prime divisors formed by {2} and the consecutive Pythagorean primes for all the composites k^2 + 1 between the two primes A002496(n) and A002496(n+1).
0, 2, 1, 3, 2, 1, 3, 4, 1, 4, 2, 7, 1, 4, 7, 6, 4, 2, 6, 4, 2, 4, 1, 2, 2, 4, 4, 3, 2, 5, 4, 3, 2, 10, 1, 2, 7, 4, 2, 3, 5, 4, 2, 2, 4, 5, 3, 4, 6, 5, 4, 7, 4, 7, 1, 5, 3, 2, 7, 5, 3, 4, 2, 8, 1, 2, 4, 7, 2, 9, 5, 4, 12, 2, 4, 6, 10, 1, 4, 1, 2, 9, 2, 5, 2, 4
Offset: 1
Examples
a(8) = 4 because the set formed by the union of the prime divisors of all the numbers k^2+1 between the primes A002496(8) = 401 and A002496(9) = 577 are {2, 5, 13, 17, 53, 97} and the subset {2} union {5, 13, 17} contains 4 consecutive elements, hence 4 is in the sequence.
Links
- Michel Lagneau, Table of n, a(n) for n = 1..10000
Programs
-
Maple
with(numtheory) :lst:={2}:lst1:={}: for k from 1 to 1000 do: q:=4*k+1: if type(q,prime)=true then lst:=lst union {q}:else fi: od: L:=subsop(lst): for n from 2 to 1000 do:p:=n^2+1:x:=factorset(p):lst1:=lst1 union x: if type(p,prime)=true then z:=lst1 minus {p}: n1:=nops(z): jj:=0: d0:=0: for j from 1 to n1 while(jj=0) do: d:=nops(z intersect L[1..j]): if d>d0 then d0:=d: else jj:=1:fi: od: lst1:={}: printf(`%d, `,d0): fi: od:
Comments