%I #16 Jun 14 2021 11:54:09
%S 7,41,99,239,1393,2943,8119,45368,47321,82417,144721,275807,470743,
%T 1607521,9369319,54608393,86105599,184424193,187869927,257926007,
%U 318281039,333815123,345611082,500001500,694220327,1176320495,1314587843,1397186643,1534997397,1855077841
%N Bases b for which there exists an integer y such that y^2 in base b consists of 4 identical digits.
%C Equivalently, numbers k such that A007913(1 + k + k^2 + k^3) < k, where A007913(n) is the squarefree part of n. Sequence is infinite since, as pointed out in Bridy et al., it contains all the terms of A002315 greater than 1. - _Giovanni Resta_, Jul 25 2017
%D Andrew Bridy, Robert J. Lemke Oliver, Arlo Shallit, and Jeffrey Shallit, The Generalized Nagell-Ljunggren Problem: Powers with Repetitive Representations, Experimental Math, 28 (2019), 428-439.
%H Andrew Bridy, Robert J. Lemke Oliver, Arlo Shallit, and Jeffrey Shallit, <a href="https://arxiv.org/abs/1707.03894">The Generalized Nagell-Ljunggren Problem: Powers with Repetitive Representations</a>, preprint arXiv:1707.03894 [math.NT], July 14 2017.
%e For example, for b = 7, we have y = 20, and the base-b representation of y^2 is 1111.
%e From _Michael De Vlieger_, Jul 24 2017: (Start)
%e Integers y for bases b:
%e Base b Integers y
%e ------ ----------------------------------
%e 7 20, 40
%e 41 1218
%e 99 7540
%e 239 20280, 40560
%e 1393 1373090
%e 2943 4903600
%e 8119 23308460, 46616920
%e 45368 316540365, 633080730, 949621095,
%e 1266161460, 1582701825, 1899242190
%e (End)
%t Select[Range[2, 3000], Function[b, Count[Map[FromDigits[ConstantArray[#, 4], b] &, Range@ b], k_ /; IntegerQ@ Sqrt@ k] > 0]] (* _Michael De Vlieger_, Jul 24 2017 *) (* or *)
%t core[n_] := Block[{f = Transpose@ FactorInteger@ n}, Times @@ (f[[1]]^ Mod[f[[2]], 2])]; Select[Range[10^5], core[1 + # + #^2 + #^3] < # &] (* _Giovanni Resta_, Jul 25 2017 *)
%Y Cf. A002315, A007913.
%K nonn,base
%O 1,1
%A _Jeffrey Shallit_, Jul 24 2017
%E a(16)-a(30) from _Giovanni Resta_, Jul 25 2017