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.

A029790 None of the digits in k is present in k^2 or k^3.

This page as a plain text file.
%I A029790 #61 May 05 2024 08:30:49
%S A029790 2,3,7,8,22,47,53,77,92,157,187,188,192,552,558,577,707,772,922,2522,
%T A029790 8338,17177,66888,575757,929522,1717177,8888588
%N A029790 None of the digits in k is present in k^2 or k^3.
%C A029790 If it exists, a(28) > 10^9. - _Derek Orr_, Jul 13 2014
%C A029790 a(28) > 2 * 10^9. - _Pratik Koirala_, _Eugene Fiorini_, _Otis Tweneboah_, _Nathan Fox_, Jul 13 2015
%C A029790 From _Manfred Scheucher_, Jul 23 2015: (Start)
%C A029790 I strongly conjecture that a(28) does not exist.
%C A029790 If a(28) exists, then a(28) > 10^20.
%C A029790 (End) [Edited by _Peter Munn_, Feb 08 2024 and _Manfred Scheucher_, Feb 09 2024]
%C A029790 If it exists, a(28) > 10^37. - _Michael S. Branicky_, May 05 2024
%H A029790 Manfred Scheucher, <a href="/A029790/a029790_3.py.txt">corrected python script</a>
%e A029790 For k = 47, k^2 = 2209 and k^3 = 103823. 4 and 7 do not appear in either of these numbers.
%p A029790 filter:= proc(n) local S1,S23;
%p A029790 S1:= convert(convert(n,base,10),set);
%p A029790 S23:= convert(convert(n^2,base,10),set) union
%p A029790       convert(convert(n^3,base,10),set);
%p A029790 nops(S1 intersect S23)=0
%p A029790 end proc:
%p A029790 select(filter,[$1..10^5]); # _Robert Israel_, Jul 14 2014
%t A029790 Select[Range@ 1000000, Intersection[IntegerDigits[#^2], IntegerDigits@ #] == {} && Intersection[IntegerDigits[#^3], IntegerDigits@ #] == {} &] (* _Michael De Vlieger_, Jul 23 2015 *)
%o A029790 (Python)
%o A029790 def a(n):
%o A029790   s = str(n)
%o A029790   s2 = str(n**2)
%o A029790   s3 = str(n**3)
%o A029790   count = 0
%o A029790   for i in s:
%o A029790     if s2.count(i) == 0 and s3.count(i) == 0:
%o A029790       count += 1
%o A029790     else:
%o A029790       break
%o A029790   if count == len(s):
%o A029790     return True
%o A029790 n = 1
%o A029790 while n < 10**9:
%o A029790   if a(n):
%o A029790     print(n, end=', ')
%o A029790   n += 1
%o A029790 # _Derek Orr_, Jul 13 2014
%o A029790 (PARI) isok(n) = d = vecsort(Set(digits(n))); dd = vecsort(Set(digits(n^2))); ddd = vecsort(Set(digits(n^3))); for (i=1, #d, if (vecsearch(dd, d[i]) || vecsearch(ddd, d[i]), return (0));); 1 \\ _Michel Marcus_, Jul 13 2014
%o A029790 (PARI) is(n)=#setintersect(setunion(Set(digits(n^2)),Set(digits(n^3))), Set(digits(n)))==0 \\ _Charles R Greathouse IV_, Jul 23 2015
%K A029790 nonn,base,more,hard
%O A029790 1,1
%A A029790 _Patrick De Geest_