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!)
A109381 Maximum digit of n^2 written in factorial base. 2

%I #22 Jan 01 2019 20:16:42

%S 0,1,2,1,2,1,2,2,2,3,4,1,1,2,3,4,2,2,3,3,3,3,4,4,4,5,5,1,2,1,2,2,2,3,

%T 3,4,4,5,2,3,2,2,3,3,4,4,5,3,3,3,4,3,4,5,4,4,4,4,4,5,5,5,5,5,5,5,6,6,

%U 6,6,6,1,1,2,3,4,2,2,3,4,5,3,2,3,4,3,3,3,4,4,4,4,4,5,5,5,5,6,6,6,6,2,3,4,2

%N Maximum digit of n^2 written in factorial base.

%C Conjecture: lim_{n->infinity} a(n) = infinity. If true, convergence is very slow, since a(1183893) = 1. Sequence is certainly unbounded, since for n >= 4, there is always a square between n*n! and (n+1)!.

%H Alois P. Heinz, <a href="/A109381/b109381.txt">Table of n, a(n) for n = 0..20954</a>

%e 4^2 = 16 = 2*6+2*2 = 220(factorial base), so a(4) = max(2,2,0) = 2.

%p b:= proc(n, i) local r; `if`(n<i, n,

%p max(b(iquo(n, i, 'r'), i+1), r))

%p end:

%p a:= n-> b(n^2, 2):

%p seq(a(n), n=0..188); # _Alois P. Heinz_, Mar 28 2018

%t Block[{nn = 105^2, r}, r = Reverse@ Most@ NestWhileList[# + 1 &, 2, #! < nn &]; Array[Max@ IntegerDigits[#^2, MixedRadix@ r] &, Sqrt@ nn, 0]] (* _Michael De Vlieger_, Jan 01 2019 *)

%o (PARI) f(n, p=2) = if( n<p, n, f( n\p, p+1 )*10 + n%p ); \\ A007623

%o a(n) = my(dfb=digits(f(n^2))); if (#dfb, vecmax(dfb), 0); \\ _Michel Marcus_, Mar 28 2018

%Y Cf. A007623, A108731, A301872.

%Y Indices of 1's in this sequence are A014597.

%K easy,nonn,base

%O 0,3

%A _Franklin T. Adams-Watters_, Aug 25 2005

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 March 29 00:26 EDT 2024. Contains 371264 sequences. (Running on oeis4.)