login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033180 Numbers k such that k! contains k as a string of digits. 3

%I #38 Feb 17 2024 10:29:12

%S 1,2,4,20,21,26,30,33,37,39,42,44,45,48,51,52,53,56,59,60,64,65,67,68,

%T 69,72,75,78,79,80,81,82,83,84,88,91,93,94,95,96,97,98,99,116,124,134,

%U 136,140,141,149,164,165,166,170,174,180,186,188,196,198,200,202,205

%N Numbers k such that k! contains k as a string of digits.

%H T. D. Noe, <a href="/A033180/b033180.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Fa#factorial">Index entries for sequences related to factorial numbers</a>

%F A067109(a(n)) > 0. [_Reinhard Zumkeller_, Aug 23 2008]

%t Select[Range[210],MemberQ[Partition[IntegerDigits[#!],IntegerLength[#], 1], IntegerDigits[ #]]&] (* _Harvey P. Dale_, Dec 25 2011 *)

%t Select[Range@500, StringContainsQ[ToString[#!], ToString[#]] &] (* _Ivan N. Ianakiev_, Jul 28 2016 *)

%t Select[Range[210],SequenceCount[IntegerDigits[#!],IntegerDigits[#]]>0&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Aug 14 2017 *)

%o (Haskell)

%o a033180 n = a033180_list !! (n-1)

%o a033180_list = filter ((> 0) . a067109) [1..]

%o -- _Reinhard Zumkeller_, Aug 28 2014

%o (Python)

%o from math import factorial

%o def ok(n): return str(n) in str(factorial(n))

%o print(list(filter(ok, range(206)))) # _Michael S. Branicky_, Aug 07 2021

%Y Cf. A000142.

%K nonn,base,easy,nice

%O 1,2

%A _Jeff Burch_

%E More terms from _David W. Wilson_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 14:49 EDT 2024. Contains 371914 sequences. (Running on oeis4.)