A075903 Duplicate of A029942.
0, 1, 4, 5, 6, 9, 10, 24, 25, 32, 40, 49, 50, 51, 56, 60, 75, 76, 90, 99, 100, 125, 240, 249
Offset: 1
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.
25^2 = 625 which contains 25. 3792^2 = 14_3792_64, 14651^2 = 2_14651_801.
import Data.List (isInfixOf) a018834 n = a018834_list !! (n-1) a018834_list = filter (\x -> show x `isInfixOf` show (x^2)) [0..] -- Reinhard Zumkeller, Jul 27 2011
Select[Range[510000], MemberQ[FromDigits /@ Partition[IntegerDigits[#^2], IntegerLength[#], 1], #] &] (* Jayanta Basu, Jun 29 2013 *) Select[Range[0,510000],StringPosition[ToString[#^2],ToString[#]]!={}&] (* Ivan N. Ianakiev, Oct 02 2016 *)
from itertools import count, islice def A018834_gen(startvalue=0): # generator of terms >= startvalue return filter(lambda n:str(n) in str(n**2), count(max(startvalue,0))) A018834_list = list(islice(A018834_gen(),20)) # Chai Wah Wu, Apr 04 2023
import Data.List (isInfixOf) a029943 n = a029943_list !! (n-1) a029943_list = filter f [0..] where f x = show x `isInfixOf` show (x^2) && show x `isInfixOf` show (x^3) -- Reinhard Zumkeller, Nov 26 2011
ssscQ[n_]:=Module[{idn=IntegerDigits[n],sq=IntegerDigits[n^2], cu=IntegerDigits[n^3],len=IntegerLength[n]},MemberQ[Partition[ sq,len,1], idn] &&MemberQ[Partition[cu,len,1],idn]]; Join[{0}, Select[Range[700000],ssscQ]] (* Harvey P. Dale, Apr 24 2011 *)
6^4 = 129_6, 83^4 = 4745_83_21, 2503^4 = 39_2503_37770081.
Select[Range[10000], StringPosition[ToString[ #^4], ToString[ # ]] != {} &] (* Tanya Khovanova, Oct 11 2007 *) 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 *)
A075904_list, m = [0], [24, -36, 14, -1, 0] for n in range(1,10**9+1): for i in range(4): m[i+1] += m[i] if str(n) in str(m[-1]): A075904_list.append(n) # Chai Wah Wu, Nov 05 2014
45^5 = 18_45_28125, 3637^5 = 6_3637_9975073041957, 3975^5 = 992_3975_07802734375.
Select[Range[0,600],SequenceCount[IntegerDigits[#^5],IntegerDigits[#]]>0&] (* Harvey P. Dale, Jul 06 2025 *)
A075905_list, m = [0], [120, -240, 150, -30, 1, 0] for n in range(1,10**8+1): for i in range(5): m[i+1] += m[i] if str(n) in str(m[-1]): A075905_list.append(n) # Chai Wah Wu, Nov 05 2014
751^3 = 423564_751.
Select[Range[0, 300], StringContainsQ[IntegerString[#^3, 2], IntegerString[#, 2]] &] (* Paolo Xausa, Apr 04 2024 *)
def ok(n): return bin(n)[2:] in bin(n**3)[2:] print([k for k in range(250) if ok(k)]) # Michael S. Branicky, Apr 04 2024
1331 is in the sequence because 1331^3 = 2357947691 contains substring of prime digits "2357". 3108 is in the sequence because 3108^3 = 30022235712 contains substring of prime digits "2357".
Select[Range[100000], MemberQ[Partition[IntegerDigits[#^3], 4, 1], {2, 3, 5, 7}] &]
isok(n) = {c = n^3; ret = 0; while (c > 1, if ((c % 10000) == 2357, ret = 1; break); c = floor(c/10);); return (ret);} \\ Michel Marcus, Dec 15 2017
A295900_list = [n for n in range(1,10**6) if '2357' in str(n**3)] # Chai Wah Wu, Feb 09 2018
Comments