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.

A031997 Odd numbers which when cubed give number composed just of the digits 0, 1, 2, 3.

This page as a plain text file.
%I A031997 #23 Apr 27 2025 12:32:25
%S A031997 1,11,101,1001,10001,100001,684917,1000001,10000001,100000001,
%T A031997 1000000001,10000000001,100000000001,1000000000001,10000000000001,
%U A031997 100000000000001,1000000000000001,10000000000000001,100000000000000001,1000000000000000001
%N A031997 Odd numbers which when cubed give number composed just of the digits 0, 1, 2, 3.
%C A031997 Note that 684917 (whose cube is 321302302131323213) so far is the only entry not of the form 10^x + 1.
%t A031997 Do[ If[ Union[ IntegerDigits[ n^3 ] ] [ [ -1 ] ] < 4, Print[ n ] ], {n, 1, 10^9, 2} ] (* corrected by _Friedjof Tellkamp_, Apr 24 2025 *)
%t A031997 (* faster code *)
%t A031997 DigitsLEQ3[n_] := And @@ (LessEqual[#, 3] & /@ IntegerDigits[n])
%t A031997 Arr = {1, 7}; For[i = 1, i < 10, i++, Arr = Flatten[Table[Select[Arr + 10^i j, DigitsLEQ3[Mod[#^3, 10^(i+1)]] &], {j, 0, 9}]]];
%t A031997 Select[Arr, DigitsLEQ3[#^3] &] (* _Friedjof Tellkamp_, Apr 25 2025 *)
%o A031997 (Python)
%o A031997 A031997_list = [n for n in range(1,10**6,2) if max(str(n**3)) <= '3'] # _Chai Wah Wu_, Feb 23 2016
%Y A031997 Cf. A030175, A043681, A278936, A278937.
%K A031997 nonn,base,more
%O A031997 1,2
%A A031997 _Robert G. Wilson v_, Jun 23 2001
%E A031997 Term 0 removed and a(12)-a(17) added by _Chai Wah Wu_, Feb 25 2016
%E A031997 a(18)-a(20) from _Giovanni Resta_, Mar 14 2020