Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Search: a256633 -id:a256633
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers n such that the decimal expansions of both n and n^2 have 0 as smallest digit and 5 as largest digit.
+10
24
50, 105, 150, 205, 350, 450, 500, 501, 502, 505, 550, 1005, 1015, 1050, 1055, 1105, 1150, 1205, 1450, 1500, 1501, 1550, 2005, 2050, 2055, 2105, 2305, 2350, 3350, 3500, 4500, 5000, 5001, 5002, 5005, 5010, 5011, 5012, 5015, 5020, 5021, 5032, 5045, 5050, 5055
OFFSET
1,1
LINKS
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {6, 9}] == 0, c[[5]] > 0, c[[10]] > 0]]; Select[Range@ 5100, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 12 2015 *)
Select[Range[5100], Min[IntegerDigits[#]]==0&&Max[IntegerDigits[#] ]== 5 && Min[IntegerDigits[#^2]]==0&&Max[IntegerDigits[#^2]]==5&] (* Harvey P. Dale, Jan 19 2020 *)
PROG
(PARI) is(n) = vecmin(digits(n))==0 && vecmin(digits(n^2))==0 && vecmax(digits(n))==5 && vecmax(digits(n^2))==5
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 05 2015
STATUS
approved
Numbers n such that the decimal expansions of both n and n^2 have 0 as smallest digit and 4 as largest digit.
+10
23
142201, 1422010, 11141110, 11411110, 11412021, 14220100, 20323421, 21024111, 101203421, 110141011, 110142201, 111411100, 114111100, 114120210, 120013421, 141433102, 142201000, 203234210, 210241110, 1012034210, 1101410011, 1101410110, 1101422010, 1114111000
OFFSET
1,1
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {5, 9}] == 0, c[[4]] > 0, c[[10]] > 0]]; Select[Range@ 10000000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 12 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==0 && vecmin(digits(n^2))==0 && vecmax(digits(n))==4 && vecmax(digits(n^2))==4
(Python)
from itertools import product
A256630_list = []
for l in range(11):
for a in ('1', '2', '3', '4'):
for b in product('01234', repeat = l):
for c in ('0', '1', '2'):
s = a+''.join(b)+c
if '0' in s and '4' in s:
n = int(s)
s2 = set(str(n**2))
if {'0', '4'} <= s2 <= {'0', '1', '2', '3', '4'}:
A256630_list.append(n)
print(A256630_list) # Chai Wah Wu, Apr 17 2015
CROSSREFS
Subsequence of A136810.
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 05 2015
EXTENSIONS
More terms from Alois P. Heinz, Apr 16 2015
STATUS
approved
Numbers n such that the decimal expansions of both n and n^2 have 0 as smallest digit and 7 as largest digit.
+10
23
740, 760, 1071, 1740, 2074, 2705, 2710, 2740, 2750, 2760, 3705, 3710, 3760, 4071, 4705, 4740, 4760, 5071, 5705, 5760, 6740, 7074, 7240, 7260, 7400, 7550, 7560, 7600, 7601, 7760, 10076, 10174, 10274, 10275, 10371, 10375, 10376, 10571, 10710, 10724, 10726, 10740
OFFSET
1,1
LINKS
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {8, 9}] == 0, c[[7]] > 0, c[[10]] > 0]]; Select[Range@ 10800, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 12 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==0 && vecmin(digits(n^2))==0 && vecmax(digits(n))==7 && vecmax(digits(n^2))==7
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 05 2015
STATUS
approved
Numbers n such that the decimal expansions of both n and n^2 have 0 as smallest digit and 8 as largest digit.
+10
23
280, 508, 780, 805, 1028, 1078, 1280, 1308, 1680, 1780, 1805, 1840, 2078, 2608, 2680, 2780, 2800, 2801, 2802, 2805, 2840, 2850, 3280, 3580, 3780, 3805, 3808, 3850, 4048, 4078, 4280, 4780, 4804, 4805, 4880, 5008, 5018, 5028, 5048, 5078, 5080, 5084, 5180, 5280
OFFSET
1,1
LINKS
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[c[[9]] == 0, c[[8]] > 0, c[[10]] > 0]]; Select[Range@ 5280, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 12 2015 *)
maxdQ[n_]:=Module[{id1=IntegerDigits[n], id2=IntegerDigits[n^2]}, Max[ id1] == Max[ id2] == 8&&Min[id1]==Min[id2]==0]; Select[Range[6000], maxdQ] (* Harvey P. Dale, Oct 19 2021 *)
PROG
(PARI) is(n) = vecmin(digits(n))==0 && vecmin(digits(n^2))==0 && vecmax(digits(n))==8 && vecmax(digits(n^2))==8
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 08 2015
STATUS
approved
Numbers n such that the decimal expansions of both n and n^2 have 0 as smallest digit and 9 as largest digit.
+10
23
509, 890, 903, 905, 930, 950, 960, 970, 980, 990, 1039, 1091, 1095, 1097, 1390, 1709, 1903, 1905, 1930, 1970, 1980, 1990, 2049, 2093, 2095, 2097, 2190, 2509, 2809, 2903, 2905, 2907, 2930, 2970, 2990, 3009, 3049, 3079, 3090, 3092, 3095, 3097, 3098, 3099, 3209
OFFSET
1,1
LINKS
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[c[[9]] > 0, c[[10]] > 0]]; Select[Range@ 3209, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 12 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==0 && vecmin(digits(n^2))==0 && vecmax(digits(n))==9 && vecmax(digits(n^2))==9
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 08 2015
STATUS
approved
Numbers k such that the decimal expansions of both k and k^2 have 1 as smallest digit and 5 as largest digit.
+10
20
115, 1115, 1235, 3515, 11115, 12335, 12415, 33515, 35415, 123335, 123512, 124235, 145415, 152132, 231115, 235211, 333515, 1114115, 1155211, 1233335, 1531115, 1534312, 2311115, 3333515, 11114115, 11141115, 11145511, 12333335, 12342335, 15334312, 15531115
OFFSET
1,1
COMMENTS
k can only begin with 1, 2 or 3 and k mod 10 can only equal 1, 2 or 5. - Robert G. Wilson v, Apr 13 2015
Heuristics suggest that this sequence should be infinite and the sequence with 4 in place of 5 should be finite. The latter sequence contains no terms up to 10^30. - Charles R Greathouse IV, Mar 20 2022
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..2000 (n = 1..75 from Robert G. Wilson v).
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {6, 10}] == 0, c[[1]] > 0, c[[5]] > 0]]; Select[Range@ 100000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 12 2015 *)
fQ[n_] := Block[{id1 = Union@ IntegerDigits[ n], id2 = Union@ IntegerDigits[ n^2]}, Min[id1] == Min[id2] == 1 && Max[id1] == Max[id2] == 5]; k = 1; lst = {}; While[k < 10^7, If[ fQ@ k, AppendTo[lst, k]]; k++; If[ fQ@ k, AppendTo[lst, k]]; k += 3; If[ fQ@ k, AppendTo[lst, k]]; k += 6]; lst (* Robert G. Wilson v, Apr 13 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==1 && vecmin(digits(n^2))==1 && vecmax(digits(n))==5 && vecmax(digits(n^2))==5
KEYWORD
base,nonn
AUTHOR
Felix Fröhlich, Apr 12 2015
STATUS
approved
Numbers k such that the decimal expansions of both k and k^2 have 1 as smallest digit and 6 as largest digit.
+10
16
116, 146, 1116, 1146, 1156, 1246, 1465, 1556, 1616, 3516, 3621, 4611, 4621, 4631, 11116, 11146, 11156, 11465, 11556, 11642, 15216, 16231, 21556, 22631, 25146, 25162, 25621, 33516, 34156, 35116, 35146, 35162, 36211, 36215, 36512, 46111, 46112, 46211, 46331
OFFSET
1,1
LINKS
MATHEMATICA
sd1Q[n_]:=Module[{idn=IntegerDigits[n]}, Min[idn]==1&&Max[idn]==6]; Select[ Range[50000], AllTrue[{#, #^2}, sd1Q]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 22 2020 *)
PROG
(PARI) is(n) = vecmin(digits(n))==1 && vecmin(digits(n^2))==1 && vecmax(digits(n))==6 && vecmax(digits(n^2))==6
KEYWORD
base,nonn
AUTHOR
Felix Fröhlich, Apr 18 2015
EXTENSIONS
Corrected b-file from Felix Fröhlich, Mar 18 2022
STATUS
approved
Numbers n such that the decimal expansions of both n and n^2 have 1 as smallest digit and 7 as largest digit.
+10
16
271, 371, 1171, 1474, 1475, 1776, 2171, 2271, 2671, 2715, 2761, 3671, 3711, 4174, 4761, 4771, 6761, 7165, 7174, 7261, 7331, 11275, 11474, 11475, 11711, 11715, 11716, 11724, 11725, 11731, 12376, 12715, 12734, 12756, 12776, 13171, 13174, 13275, 13276, 14674
OFFSET
1,1
COMMENTS
There are 2 3-digit terms, 19 4-digit terms, 122 5-digit terms, 646 6-digit terms, 3147 7-digit terms, 13300 8-digit terms, 54689 9-digit terms, and 216858 10-digit terms. - Charles R Greathouse IV, Apr 20 2015
LINKS
MATHEMATICA
fQ[n_] := Block[{d = DigitCount@ n}, Plus @@ Take[d, {8, 10}] == 0 && d[[1]] > 0 && d[[7]] > 0]; Select[Range@ 15000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 20 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==1 && vecmin(digits(n^2))==1 && vecmax(digits(n))==7 && vecmax(digits(n^2))==7
(PARI) has(n)=my(d=Set(digits(n))); #d && d[1]==1 && d[#d]==7
is(n)=has(n) && has(n^2)
for(d=3, 7, for(i=6, 7^d-1, v=digits(i, 7); if(#v<=d, v=concat(vector(d-#v), v)); if(vecmax(v)==6 && vecmin(v)==0 && has((n=fromdigits(apply(k->k+1, v)))^2), print1(n", ")))) \\ Charles R Greathouse IV, Apr 20 2015
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 18 2015
STATUS
approved
Numbers n such that the decimal expansions of both n and n^2 have 1 as smallest digit and 8 as largest digit.
+10
16
128, 178, 871, 1128, 1178, 1218, 1258, 1278, 1284, 1328, 1358, 1368, 1478, 1678, 1681, 1768, 1778, 1784, 1785, 1828, 1874, 1881, 2681, 2861, 2871, 3418, 3581, 3718, 3816, 3841, 4178, 4318, 4815, 4831, 4841, 4881, 5178, 5181, 5182, 5318, 5815, 5841, 5871, 5881
OFFSET
1,1
LINKS
MATHEMATICA
fQ[n_] := Block[{d = DigitCount@ n}, Plus @@ Take[d, {9, 10}] == 0 && d[[1]] > 0 && d[[8]] > 0]; Select[Range@ 6000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 20 2015 *)
sd1ld8Q[n_]:=With[{idn=IntegerDigits[n]}, Max[idn]==8&&Min[idn]==1]; Select[ Range[ 6000], AllTrue[{#, #^2}, sd1ld8Q]&] (* Harvey P. Dale, Oct 14 2022 *)
PROG
(PARI) is(n) = vecmin(digits(n))==1 && vecmin(digits(n^2))==1 && vecmax(digits(n))==8 && vecmax(digits(n^2))==8
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 18 2015
STATUS
approved
Numbers n such that the decimal expansions of both n and n^2 have 1 as smallest digit and 9 as largest digit.
+10
13
139, 219, 519, 591, 719, 891, 911, 961, 971, 981, 1139, 1193, 1219, 1292, 1293, 1296, 1319, 1339, 1389, 1391, 1392, 1394, 1396, 1469, 1579, 1589, 1691, 1719, 1729, 1769, 1793, 1839, 1869, 1896, 1911, 1927, 1937, 1939, 1944, 1946, 1969, 1978, 1979, 1981, 1986
OFFSET
1,1
LINKS
MATHEMATICA
fQ[n_] := Block[{d = DigitCount@ n}, Last@ d == 0 && d[[1]] > 0 && d[[9]] > 0]; Select[Range@ 2000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 20 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==1 && vecmin(digits(n^2))==1 && vecmax(digits(n))==9 && vecmax(digits(n^2))==9
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 20 2015
STATUS
approved

Search completed in 0.015 seconds