login
A064379
Irregular triangle whose n-th row is a list of numbers that are infinitarily relatively prime to n (n = 2, 3, ...).
5
1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 4, 5, 1, 2, 3, 4, 5, 6, 1, 3, 5, 7, 1, 2, 3, 4, 5, 6, 7, 8, 1, 3, 4, 7, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 5, 7, 9, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 3, 4, 5, 9, 11, 12, 13, 1, 2, 4, 7, 8, 9, 11, 13, 14, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
OFFSET
2,3
COMMENTS
The integers less than n that have no common infinitary divisors with n.
EXAMPLE
irelprime[6] = {1, 4, 5} because iDivisors[6] = {1, 2, 3, 6} and iDivisors[4] = {1, 4} so 4 is infinitary_relatively_prime to 6 since it lacks common infinitary divisors with 6.
For n = 2 ..8 irelprime[n] gives {1}, {1,2}, {1,2,3}, {1,2,3,4}, {1,4,5}, {1,2,3,4,5,6}, {1,3,5,7}.
Triangle starts:
2: 1;
3: 1, 2;
4: 1, 2, 3;
5: 1, 2, 3, 4;
6: 1, 4, 5;
7: 1, 2, 3, 4, 5, 6;
8: 1, 3, 5, 7;
9: 1, 2, 3, 4, 5, 6, 7, 8;
10: 1, 3, 4, 7, 9;
11: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
12: 1, 2, 5, 7, 9, 10, 11;
13: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
14: 1, 3, 4, 5, 9, 11, 12, 13;
15: 1, 2, 4, 7, 8, 9, 11, 13, 14;
MATHEMATICA
irelprime[ n_ ] := Select[ temp=iDivisors[ n ]; Range[ n ], Intersection[ iDivisors[ # ], temp ]==={1}& ]; (* with iDivisors of n as *) bitty[ k_ ] := Union[ Flatten[ Outer[ Plus, Sequence@@{0, #1}&/@Union[ 2^Range[ 0, Floor[ Log[ 2, k ] ] ]*Reverse[ IntegerDigits[ k, 2 ] ] ] ] ] ]; iDivisors[ k_Integer ] := Sort[ (Times @@(First[ it ]^(#1/.z-> List))&)/@Flatten[ Outer[ z, Sequence@@bitty/@Last[ it=Transpose[ FactorInteger[ k ] ] ], 1 ] ] ]; iDivisors[ 1 ] := {1};
infCoprimeQ[n1_, n2_] := Module[{g = GCD[n1, n2]}, If[g == 1, True, AllTrue[ FactorInteger[g][[;; , 1]], BitAnd @@ IntegerExponent[{n1, n2}, #] == 0 &]]]; row[n_] := Select[Range[n - 1], infCoprimeQ[#, n] &]; Table[row[n], {n, 2, 16}] // Flatten (* Amiram Eldar, Mar 26 2023 *)
PROG
(PARI) isinfcoprime(n1, n2) = {my(g = gcd(n1, n2), p, e1, e2); if(g == 1, return(1)); p = factor(g)[, 1]; for(i=1, #p, e1 = valuation(n1, p[i]); e2 = valuation(n2, p[i]); if(bitand(e1, e2) > 0, return(0))); 1; }
row(n) = select(x->isinfcoprime(x, n), vector(n-1, i, i)); \\ Amiram Eldar, Mar 26 2023
CROSSREFS
Sequence in context: A318806 A066019 A051237 * A278961 A194973 A195113
KEYWORD
nonn,tabf
AUTHOR
Wouter Meeussen, Sep 27 2001
STATUS
approved