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.

A292624 Number of solutions to 4/p = 1/x + 1/y + 1/z in positive integers, where p is the n-th prime.

Original entry on oeis.org

3, 12, 12, 36, 48, 24, 24, 60, 120, 42, 108, 54, 42, 78, 198, 78, 156, 66, 96, 234, 42, 216, 156, 60, 48, 96, 156, 144, 90, 78, 192, 186, 102, 210, 108, 180, 144, 138, 384, 156, 276, 102, 396, 36, 138, 246, 174, 342, 216, 120, 114, 630, 48, 300
Offset: 1

Views

Author

Hugo Pfoertner, Sep 20 2017

Keywords

Comments

Corrected version of A192788.

Examples

			a(3) = 12 because 4/(3rd prime) = 4/5 can be expressed in the following 12 ways:
  4/5 =  1/2  + 1/4  + 1/20
  4/5 =  1/2  + 1/5  + 1/10
  4/5 =  1/2  + 1/10 + 1/5
  4/5 =  1/2  + 1/20 + 1/4
  4/5 =  1/4  + 1/2  + 1/20
  4/5 =  1/4  + 1/20 + 1/2
  4/5 =  1/5  + 1/2  + 1/10
  4/5 =  1/5  + 1/10 + 1/2
  4/5 =  1/10 + 1/2  + 1/5
  4/5 =  1/10 + 1/5  + 1/2
  4/5 =  1/20 + 1/2  + 1/4
  4/5 =  1/20 + 1/4  + 1/2
		

References

  • For references and links see A192787.

Crossrefs

Programs

  • Mathematica
    checkmult[a_, b_, c_] := If[Denominator[c] == 1, If[a == b && a == c && b == c, Return[1], If[a != b && a != c && b != c, Return[6], Return[3]]], Return[0]];
    a292581[n_] := Module[{t, t1, s, a, b, c, q = Quotient}, t = 4/n; s = 0; For[a = q[1, t] + 1, a <= q[3, t], a++, t1 = t - 1/a; For[b = Max[q[1, t1] + 1, a], b <= q[2, t1], b++, c = 1/(t1 - 1/b); s += checkmult[a, b, c]]]; Return[s]];
    Reap[For[n = 1, n <= 54, n++, Print[n, " ", an = a292581[Prime[n]]]; Sow[an]]][[2, 1]] (* Jean-François Alcover, Dec 02 2018, adapted from PARI *)
  • PARI
    checkmult (a,b,c) =
    {
      if(denominator(c)==1,
         if(a==b && a==c && b==c,
            return(1),
            if(a!=b && a!=c && b!=c,
               return(6),
               return(3)
              )
           ),
         return(0)
         )
    }
    a292624(n) =
    {
      local(t, t1, s, a, b, c);
      t = 4/prime(n);
      s = 0;
      for (a=1\t+1, 3\t,
         t1=t-1/a;
         for (b=max(1\t1+1,a), 2\t1,
              c=1/(t1-1/b);
              s+=checkmult(a,b,c);
             )
          );
      return(s);
    }
    for (n=1,54,print1(a292624(n),", "))

Formula

a(n) = A292581(A000040(n)).