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.

A173687 Numbers m such that the sum of factorial of the decimal digits of m is square.

Original entry on oeis.org

0, 1, 14, 15, 17, 22, 40, 41, 45, 50, 51, 54, 70, 71, 102, 112, 120, 121, 123, 132, 144, 156, 165, 200, 201, 203, 210, 211, 213, 230, 231, 302, 312, 320, 321, 334, 343, 404, 414, 433, 440, 441, 457, 475, 506, 516, 547, 560, 561, 574, 605, 615, 650, 651, 745, 754, 1000
Offset: 1

Views

Author

Michel Lagneau, Nov 25 2010

Keywords

Comments

Let the decimal expansion of n = d(0)d(1)...d(p). Numbers such that Sum_{k=0..p} d(k)! is square.
Same as A130687 except for the additional 0. - Georg Fischer, Oct 12 2018

Examples

			17 is in the sequence because 1! + 7! = 1 + 5040 = 71^2.
		

Programs

  • Magma
    [ n: n in [0..1000] | n eq 0 or IsSquare(&+[ Factorial(d): d in Intseq(n) ]) ];
    
  • Maple
    with(numtheory):for n from 0 to 1000 do:l:=length(n):n0:=n:s:=0:for m from
      1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v :s:=s+u!:od: q:=sqrt(s):if
      floor(q)= q then printf(`%d, `,n):else fi:od:~
  • Mathematica
    Select[Range[0, 1000], IntegerQ[Sqrt[Total[IntegerDigits[#]!]]]&] (* Jinyuan Wang, Feb 26 2020 *)
  • Python
    from itertools import count, islice, combinations_with_replacement
    from math import factorial
    from sympy.ntheory.primetest import is_square
    from sympy.utilities.iterables import multiset_permutations
    def A173687_gen(): # generator of terms
        yield 0
        for l in count(0):
            for i in range(1,10):
                fi = factorial(i)
                yield from sorted(int(str(i)+''.join(map(str,k))) for j in combinations_with_replacement(range(10), l) for k in multiset_permutations(j) if is_square(fi+sum(map(factorial,j))))
    A173687_list = list(islice(A173687_gen(),50)) # Chai Wah Wu, Feb 23 2023

A130688 Numbers n with following property: suppose n^6 = d1 d2 d3 ...dk in decimal; then d1! + d2! + ... + dk! is a square.

Original entry on oeis.org

1, 6, 747, 2802, 10000, 10256, 11876, 13875, 14623, 14710, 17117, 18090, 23919, 26569, 34282, 35402, 40515, 41202, 41850, 42195, 44684, 48396, 54698, 58509, 59293, 59644, 59900, 65502, 67795, 74004, 75320, 79593, 82677, 82713, 83402
Offset: 1

Views

Author

Yalcin Aktar, Jun 30 2007

Keywords

Comments

Numbers n such that n^6 is in A130687.

Examples

			a(2) = 6, because 6^6 = 46656, and (4!+6!+6!+5!+6!)^(1/2) = 48 is an integer.
		

Crossrefs

Programs

  • Maple
    A061602 := proc(n) local digs ; digs := convert(n,base,10) ; add(factorial(op(i,digs)),i=1..nops(digs)) ; end: isA130687 := proc(n) RETURN(issqr(A061602(n))) ; end: isA130688 := proc(n) RETURN(isA130687(n^6)) ; end: for n from 1 to 130000 do if isA130688(n) then printf("%d, ",n) ; fi : od:
  • PARI
    for(n=1,10^5,m=n^6;s=0;while(m,s+=(m%10)!;m\=10);if(issquare(s),print1(n",")))

Extensions

Edited by R. J. Mathar and Martin Fuller, Jul 13 2007
Showing 1-2 of 2 results.