Message Boards Message Boards

0
|
137 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

Counting common sublists in two variables

nn=Range[1,10000000]
    n=Select[nn,PrimeQ,(500)]
    n2=Select[nn,IntegerQ,(500)]
    k=(n^2)-1+(n)+(2-4n)
    d=n^4-1+n^2
    c=n^3+2
    e=Mod[c,3]
    f=Mod[d,3]
    g=Mod[k,3]
    h=Mod[c,7]
    i=Mod[d,7]
    j=Mod[k,7]
    l=Mod[c,4]
    m=Mod[d,4]
    o=Mod[k,4]
    r=Mod[c,5]
    s=Mod[d,5]
    t=Mod[k,5]
    QQ=Transpose[{e,f,g,h,i,j,l,m,o,r,s,t}]
    hh=2000
    n2=Select[nn,OddQ,(hh)]
    k1=(n2^2)-1+(n2)+(2-4n2)
    d1=n2^4-1+n2^2
    c1=n2^3+2
    e1=Mod[c1,3]
    f1=Mod[d1,3]
    g1=Mod[k1,3]
    h1=Mod[c1,7]
    i1=Mod[d1,7]
    j1=Mod[k1,7]
    l1=Mod[c1,4]
    m1=Mod[d1,4]
    o1=Mod[k1,4]
    r1=Mod[c1,5]
    s1=Mod[d1,5]
    t1=Mod[k1,5]
    pp1=Transpose[{e1,f1,g1,h1,i1,j1,l1,m1,o1,r1,s1,t1}]
    number of sublists = Count[pp1, QQ, {2}]

How can i make it work I want to count the sublists that appear in QQ that are also present in pp1 , QQ is list of sublists of mod for prime numbers that only appear when the number is prime , and in pp1 that are some sublists that match th sublists when the number odd is also prime... please help me...

Posted 10 days ago
Intersection[pp1, QQ] // Length
POSTED BY: Hans Milton
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract