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.

A064827 Numbers k such that each digit of k occurs among the digits of k^2.

This page as a plain text file.
%I A064827 #19 Apr 03 2023 18:23:21
%S A064827 1,5,6,10,11,25,27,50,60,63,64,74,76,95,96,100,101,105,110,125,139,
%T A064827 142,205,250,255,261,270,275,277,278,285,305,364,371,376,405,421,441,
%U A064827 463,472,493,497,500,501,502,503,504,505,506,507,508,509,523,524,525,593,600,601,602
%N A064827 Numbers k such that each digit of k occurs among the digits of k^2.
%C A064827 That is, if n is d digits long, then each one of those d digits occurs in the digits of n^2.
%e A064827 125^2 = 15625, which contains all digits of 125, so 125 is a term of the sequence.
%e A064827 55 is not here because 55^2 = 3025, which has only one 5.
%t A064827 Reap[Do[a = DigitCount[n^2]; b = DigitCount[n]; If[Min[a-b] >= 0, Sow[n]], {n, 1, 10^3}]][[2,1]]
%o A064827 (Python)
%o A064827 from itertools import count, islice
%o A064827 from collections import Counter
%o A064827 def A064827_gen(startvalue=1): # generator of terms >= startvalue
%o A064827     return filter(lambda k:Counter(str(k))<=Counter(str(k**2)),count(max(startvalue,1)))
%o A064827 A064827_list = list(islice(A064827_gen(),20)) # _Chai Wah Wu_, Apr 03 2023
%Y A064827 Cf. A046827 (essentially the same).
%K A064827 nonn,base
%O A064827 1,2
%A A064827 _Joseph L. Pe_, Feb 14 2002