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.

Showing 1-2 of 2 results.

A227644 Perfect powers equal to the sum of 2 factorial numbers.

Original entry on oeis.org

4, 8, 25, 121, 144, 5041
Offset: 1

Views

Author

Giovanni Resta, Jul 19 2013

Keywords

Comments

a(7), if it exists, is greater than 10^100.
a(7), if it exists, is greater than 10000!. - Filip Zaludek, Jul 18 2017
a(7), if it exists, is greater than 11750!. - Filip Zaludek, Sep 07 2018
a(7), if it exists, is greater than 20000!. - Filip Zaludek, Nov 04 2020

Examples

			5041 = 71^2 = 1! + 7!.
		

Crossrefs

Programs

  • C
    /* To compile: gcc -Wall -O2 A227644.c -o A227644 -lgmp */
    #include 
    #include 
    #include 
    int main()
    {
       int bsz=256, a=0;
       mpz_t *f, t;
       f = malloc(sizeof(mpz_t) * bsz);
       mpz_init(t); mpz_init(f[0]); mpz_set_ui(f[0], 1);
       while (1)
       {
           a += 1;
           if (a == bsz)
           {
               bsz *= 2;
               f = (mpz_t *) realloc(f, sizeof(mpz_t) * bsz);
           }
           mpz_init(f[a]);
           mpz_mul_ui(f[a], f[a-1], a);
           for (int i=1; i<=a; i++)
           {
               mpz_add(t, f[a], f[i]);
               if (mpz_perfect_power_p(t))
               {
                   gmp_printf("%Zd, ", t);
                   fflush(stdout);
               }
           }
       }
       return 0;
    }

A162681 Numbers k such that k^2 is a sum of three factorials.

Original entry on oeis.org

2, 3, 6, 7, 29, 72
Offset: 1

Views

Author

Keywords

Comments

The next term after 72 is larger than 10^40 (if it exists). - R. J. Mathar, Jul 16 2009

Examples

			2^2 = 1! + 1! + 2!;
3^2 = 1! + 2! + 3!;
6^2 = 3! + 3! + 4!;
7^2 = 1! + 4! + 4!;
29^2 = 1! + 5! + 6!;
72^2 = 4! + 5! + 7!.
		

Crossrefs

Programs

  • Maple
    s := 10^40 ; sqr := s^2 : for a from 1 do if a! > sqr then break; fi; for b from a do if a!+b! > sqr then break; fi; for c from b do if a!+b!+c! > sqr then break; fi; if issqr(a!+b!+c!) then print( sqrt(a!+b!+c!)); fi; od: od: od: # R. J. Mathar, Jul 16 2009
    w := 7: f := proc (x, y, z) options operator, arrow: sqrt(factorial(x)+factorial(y)+factorial(z)) end proc: A := {}: for x to w do for y to w do for z to w do if type(f(x, y, z), integer) = true then A := `union`(A, {f(x, y, z)}) else end if end do end do end do: A; # Emeric Deutsch, Aug 03 2009
  • Mathematica
    $MaxExtraPrecision=Infinity; lst={};Do[Do[Do[x=(a!+b!+c!)^(1/2);If[x==IntegerPart[x], AppendTo[lst,x]],{c,b,2*4!}],{b,a,2*4!}],{a,2*4!}];Union[lst]

Extensions

Definition rephrased by R. J. Mathar, Jul 16 2009
Showing 1-2 of 2 results.