%I #24 Apr 04 2024 10:33:53
%S 0,1,5,6,10,25,50,60,76,83,92,100,107,211,217,250,352,363,376,500,556,
%T 600,625,636,760,863,909,935,1000,1531,1636,2263,2500,2503,3630,3760,
%U 4342,5000,5001,6000,6250,7245,7600,8578,9350,9376,10000,25000,28206,32213
%N Numbers k such that k^4 has k as a substring of its decimal expansion.
%H Chai Wah Wu, <a href="/A075904/b075904.txt">Table of n, a(n) for n = 1..206</a>
%e 6^4 = 129_6, 83^4 = 4745_83_21, 2503^4 = 39_2503_37770081.
%t Select[Range[10000], StringPosition[ToString[ #^4], ToString[ # ]] != {} &] (* _Tanya Khovanova_, Oct 11 2007 *)
%t ssQ[n_]:=Module[{idn=IntegerDigits[n],idn4=IntegerDigits[n^4]}, MemberQ[ Partition[ idn4, Length[ idn],1], idn]]; Select[Range[10000],ssQ] (* _Harvey P. Dale_, Mar 13 2013 *)
%o (Python)
%o A075904_list, m = [0], [24, -36, 14, -1, 0]
%o for n in range(1,10**9+1):
%o ....for i in range(4):
%o ........m[i+1] += m[i]
%o ....if str(n) in str(m[-1]):
%o ........A075904_list.append(n) # _Chai Wah Wu_, Nov 05 2014
%Y Cf. A018834 (squares), A029942 (cubes), A075905 (5th powers).
%K base,nonn
%O 1,3
%A _Zak Seidov_, Sep 27 2002
%E More terms from _Tanya Khovanova_, Oct 11 2007
%E Added 0 to sequence by _Chai Wah Wu_, Nov 05 2014
|