A272856 Greatest length of a chain of consecutive primes p==1 (mod 3) for which A261029 (2*prime(n)*p) is 4-i if prime(n) == i (mod 3), where i=1,2.
5, 7, 16, 19, 32, 35, 50, 76, 81, 108, 140, 139, 171, 206, 254, 259, 305, 346, 349, 404, 449, 504, 582, 634, 645, 699, 707, 772, 930, 1006, 1078, 1097, 1258, 1271, 1362, 1448, 1529, 1633, 1737, 1752, 1951, 1970, 2064, 2082, 2310, 2550, 2659, 2672, 2783, 2917
Offset: 3
Keywords
Examples
Let n=3; then prime(n)=5. Since 5 == 2 (mod 3), i=2. So a(3) is the greatest length of a chain of consecutive primes p == 1 (mod 3) for which A261029(10*p) = 4 - 2 = 2. So these primes are in A272381. The first term is 7, and we have the chain of consecutive primes == 1 (mod 3): {7, 13, 19, 31, 37}. Since the following prime 43 == 1 (mod 3) is not in A272381, the chain ends and its length is 5. The second chain is the singleton {71}. So a(3)=5.
Programs
-
Mathematica
a261029[n_]:=a261029[n]={x,y,z}/.{ToRules[Reduce[x^3+y^3+z^3-3 x y z==n&&0<=x<=y<=z&&z>=x+1,Integers]]}/.{x,y,z}->{}; data={}; Do[p=Prime[n]; primes=Select[Prime[Range[1+PrimePi[(2p)^2]]],Mod[#,3]==1&]; tmp=Map[{#,Length[a261029[2 # p]]}&,primes]; AppendTo[data,{{n,2p,1+Mod[2p,3]},{{Length[#],Max[Map[Length,Select[Split[Differences[Flatten[Map[Position[primes,#,1,1]&,#]]]],#[[1]]==1&]]+1]},#}&[Map[#[[1]]&,Select[tmp,#[[2]]==(1+Mod[2p,3])&]]]}];Print[Last[data]],{n,3,10}] Map[Length[a261029[#]]&,Range[0,20]] (* A261029 *) Last[Last[data[[1]]]] (* A272381 *) Last[Last[data[[2]]]] (* A272382 *) Last[Last[data[[3]]]] (* A272384 *) Last[Last[data[[4]]]] (* A272404 *) Last[Last[data[[5]]]] (* A272406 *) Last[Last[data[[6]]]] (* A272407 *) Last[Last[data[[7]]]] (* A272409 *) Map[#[[2]][[1]][[1]]&,data] (* A268665 *) Map[#[[2]][[1]][[2]]&,data] (* A272856 *)