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.

A158022 Integers k such that all the digits needed to write the consecutive nonnegative integers from 0 to k fill exactly a square (no holes, no overlaps).

This page as a plain text file.
%I A158022 #15 Mar 31 2025 11:57:48
%S A158022 0,3,8,12,22,36,54,76,101,121,132,156,169,197,212,244,261,297,316,356,
%T A158022 377,421,444,492,517,569,596,652,681,741,772,836,869,937,972,10221,
%U A158022 10626,11041,11466,11901,12346,12801,13266,13741,14226,14721,15226
%N A158022 Integers k such that all the digits needed to write the consecutive nonnegative integers from 0 to k fill exactly a square (no holes, no overlaps).
%C A158022 The sides of the successive squares are given by A158023. Terms computed by Jean-Marc Falcoz.
%C A158022 Integers k such that A058183(k)+1 is a square. - _Dominic McCarty_, Mar 28 2025
%H A158022 Dominic McCarty, <a href="/A158022/b158022.txt">Table of n, a(n) for n = 1..10000</a>
%H A158022 Eric Angelini, <a href="http://www.cetteadressecomportecinquantesignes.com/DigitSpiral.htm">Digit Spiral</a>
%H A158022 Eric Angelini, <a href="/A158022/a158022.pdf">Digit Spiral</a> [Cached copy, with permission]
%e A158022 ...0...01...012...0123...012345
%e A158022 .......23...345...4567...678910
%e A158022 ............678...8910...111213
%e A158022 ..................1112...141516
%e A158022 .........................171819
%e A158022 .........................202122
%e A158022 The integers fitting exactly in the SE corner of the above squares are 0, 3, 8, 12, 22. There is no 5x5 square where this is possible.
%o A158022 (Python)
%o A158022 from math import isqrt
%o A158022 a, k, l = [], 0, 0
%o A158022 while len(a) < 40:
%o A158022     l += len(str(k))
%o A158022     if l == isqrt(l) ** 2: a.append(k)
%o A158022     k += 1
%o A158022 print(a) # _Dominic McCarty_, Mar 28 2025
%Y A158022 Cf. A058183, A158023.
%K A158022 base,nonn
%O A158022 1,2
%A A158022 _Eric Angelini_, Mar 11 2009