cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

User: Sirius Caffrey

Sirius Caffrey's wiki page.

Sirius Caffrey has authored 2 sequences.

A260842 Sum of lcm(gcd(i,j), gcd(k,l)) for i,j,k,l in range [1..n].

Original entry on oeis.org

1, 23, 136, 516, 1289, 3271, 5908, 11084, 18833, 31503, 44072, 71156, 93681, 133095, 190052, 256468, 311909, 421619, 501412, 664112, 847013, 1035763, 1186208, 1515000, 1790625, 2114575, 2502268, 3028600, 3354613, 4109163, 4517824, 5246624, 6070201, 6853807, 7933304
Offset: 1

Author

Sirius Caffrey, Aug 01 2015

Keywords

Programs

  • Maple
    N:= 100: # to get a(1) to a(N)
    M:= Matrix(N,N,igcd,shape=symmetric):
    T:= Vector(N):
    for n from 1 to N do
      T[M[n,n]]:= T[M[n,n]]+1;
      for j from 1 to n-1 do
        T[M[n,j]]:= T[M[n,j]]+2;
      od:
      A[n]:= 2*add(add(ilcm(i,j)*T[i]*T[j],i=1..j-1),j=2..n) + add(i*T[i]^2,i=1..n);
    od:
    seq(A[n],n=1..N); # Robert Israel, Aug 04 2015
  • Mathematica
    f[n_] := Sum[ LCM[ GCD[i, j], GCD[k, l]], {i, n}, {j, n}, {k, n}, {l, n}]; Array[f, 35] (* Robert G. Wilson v, Aug 02 2015 *)
  • PARI
    a(n) = {s = 0; for (i=1, n, for (j=1, n, for (k=1, n, for (l=1, n, s += lcm(gcd(i,j),gcd(k,l)););););); s;} \\ Michel Marcus, Aug 01 2015

Extensions

More terms from Michel Marcus, Aug 01 2015

A260185 a(n) is the number of ways to select an ordered pair of subsets of {2,...,n} such that each pair of elements from different subsets are relatively prime.

Original entry on oeis.org

1, 3, 9, 21, 63, 111, 333, 693, 1521, 2577, 7731, 13491, 40473, 67833, 119241, 239481, 718443, 1340523, 4021569, 7494849, 13356657, 22271409, 66814227, 130266387, 268286823, 447212583, 896472063, 1684872063, 5054616189, 9566769789, 28700309367, 57402497367
Offset: 1

Author

Sirius Caffrey, Jul 17 2015

Keywords

Comments

This sequence was used by LuoYuping when he set a problem for NOI 2015 Day1 Problem3.
a(n) is the number of ways to find X and Y where set X and Y are subsets of {2,...,n}, and for all a in X and all b in Y, gcd(a,b) = 1. Also note that X or Y can be empty.

Examples

			For n=1 the 1 pair of sets is [{},{}].
For n=2 the 3 pairs of sets are [{},{}], [{2},{}], and [{},{2}].
For n=3 the 9 pairs of sets are [{},{}], [{2},{}], [{},{2}], [{3},{}], [{},{3}], [{2,3},{}], [{},{2,3}], [{2},{3}], and [{3},{2}].
		

References

  • National Olympiad in Informatics 2015, China, Day 1 Problem 3.

Programs

  • Python
    #  see link above

Formula

a(p) = 3*a(p-1) for p prime. - Alois P. Heinz, Jul 19 2015

Extensions

a(31)-a(32) from Giovanni Resta, Jul 18 2015