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.

A294660 Least nonnegative integer not occurring earlier whose square has no digit in common with the square of the previous term, a(0) = 0.

This page as a plain text file.
%I A294660 #23 Aug 11 2024 14:41:34
%S A294660 0,1,2,3,4,5,6,7,9,8,10,15,12,16,20,11,22,13,18,14,28,19,17,21,23,26,
%T A294660 29,24,30,25,33,58,27,34,47,38,45,31,48,41,50,37,52,44,65,40,57,76,32,
%U A294660 63,35,60,39,62,36,88,46,67,51,183,75,43,55,42,53,56,70,61,64,85,59,77,69,73,78,89
%N A294660 Least nonnegative integer not occurring earlier whose square has no digit in common with the square of the previous term, a(0) = 0.
%C A294660 This is not a permutation of the nonnegative integers, since numbers whose square has all digits '1' through '9' (cf. A294661, e.g., 11826 with 11826^2 = 139854276) can never appear - and these numbers have asymptotic density 1.
%C A294660 Will all integers whose square does not have all of the digits 1-9, eventually appear? Or might the sequence be finite? Since a(n)^2 has no digits in common with a(n-1)^2, it is sufficient for a(n+1) to exist, to find a number whose square has a subset of the digits of a(n-1)^2. Is this always possible? This problem sometimes has only "sporadic k-digital solutions", see, e.g., A058430, A030175, ... and the link to De Geest's page.
%H A294660 M. F. Hasler, <a href="/A294660/b294660.txt">Table of n, a(n) for n = 0..4829</a>
%H A294660 P. De Geest, <a href="https://www.worldofnumbers.com/threedigits.htm">Squares containing at most three distinct digits, Index entries for related sequences</a>
%e A294660 Since a(7)^2 = 7^2 = 49, the subsequent term cannot be 8, since 8^2 = 64 has the digit 4 in common with 49. Therefore, a(8) = 9, with 9^2 = 81 having no common digit with 49.
%e A294660 a(1201) = 1037. So the square of the next term must not have any of the digits in {0, 1, 3, 5, 6, 7, 9}, only 2, 4, 8 are allowed. The least such number that has not been used before is a(1202) = 210912978, with a(1202)^2 = 210912978^2 = 44484284288828484. - _Alois P. Heinz_, Nov 09 2017
%o A294660 (PARI) {u=a=0; for(n=0, 99, print1(a", "); u+=1<<a; D=Set(if(a, digits(a^2))); for(k=1, oo, bittest(u, k)&&next; #setintersect(D, Set(digits(k^2)))&&next; a=k; break)); a}
%o A294660 (PARI) {u=[a=0]; for(n=0, 99, print1(a", "); D=Set(if(a, digits(a^2))); for(k=u[1]+1, oo, setsearch(u, k)&&next; #setintersect(D, Set(digits(k^2)))&&next; u=setunion(u,[a=k]); break); while(#u>1&&u[2]==u[1]+1,u=u[^1])); a}
%Y A294660 Cf. A030287 (strictly increasing), A067581 (do not take squares).
%K A294660 nonn,base,look
%O A294660 0,3
%A A294660 _M. F. Hasler_, Nov 08 2017