[go: up one dir, main page]

login
Search: a257197 -id:a257197
     Sort: relevance | references | number | modified | created      Format: long | short | data
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
Numbers n such that the decimal expansions of both n and n^2 have 2 as smallest digit and 5 as largest digit.
+10
12
235, 2335, 23335, 233335, 2333335, 2354235, 23333335, 233333335, 2333333335, 2333524235, 23333333335, 23333524235, 233333333335, 2333333333335, 23333333333335, 233333333333335, 2333333333333335, 23333333333333335, 233333333333333335, 2333333333333333335
OFFSET
1,1
COMMENTS
Conjecture: a(n) = A137066(n+2) for all n, i.e., this is A137066 without the initial two terms.
(10^(k+1)-1)/3 - 10^k + 2 are terms for k > 1. Conjecture: except for 2354235, 2333524235, and 23333524235, all terms are of this form. - Chai Wah Wu, Sep 10 2017
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..40 (n = 1..31 from Hiroaki Yamanouchi)
MATHEMATICA
fQ[n_] := Block[{d = DigitCount@ n}, Plus @@ Prepend[Take[d, {6, 10}], First@ d] == 0 && d[[2]] > 0 && d[[5]] > 0]; Select[Range@ 1000000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 20 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==2 && vecmin(digits(n^2))==2 && vecmax(digits(n))==5 && vecmax(digits(n^2))==5
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 20 2015
EXTENSIONS
a(11)-a(20) from Hiroaki Yamanouchi, May 04 2015
STATUS
approved
Numbers k such that the decimal expansions of both k and k^2 have 2 as smallest digit and 6 as largest digit.
+10
10
255465, 652244, 665256, 2534665, 2536656, 2554262, 6523462, 6524235, 6652242, 23352656, 23354365, 23523462, 23546665, 23565325, 25346665, 25425256, 25624665, 25625465, 65226242, 65234535, 235442656, 254234662, 255465525, 255645525, 256246665, 256254665
OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..2000 (n = 1..42 from Robert Israel).
MAPLE
M:= 10:
B:= [[2], [3], [4], [5], [6]]:
A:= NULL:
for d from 2 to M do
B:= map(b -> seq([op(b), i], i=2..6), B);
C:= select(b -> max(b)=6 and min(b) = 2, B);
X:= map(b -> add(b[i]*10^(d-i), i=1..d), C);
X:= select(proc(x) local L; L:= convert(x^2, base, 10); max(L) = 6 and min(L) = 2 end proc, X);
A:= A, op(X);
od:
A; # Robert Israel, Apr 27 2015
MATHEMATICA
fQ[n_] := Block[{d = DigitCount@ n}, Plus @@ Prepend[Take[d, -4], First@ d] == 0 && d[[2]] > 0 && d[[6]] > 0]; Select[Range@ 2600000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 27 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==2 && vecmin(digits(n^2))==2 && vecmax(digits(n))==6 && vecmax(digits(n^2))==6
(Python)
from itertools import product
A249915_list = []
for l in range(10):
for a in product('23456', repeat = l):
for b in ('2', '4', '5', '6'):
s = ''.join(a)+b
if '2' in s and '6' in s:
n = int(s)
if {'2', '6'} <= set(str(n**2)) <= {'2', '3', '4', '5', '6'}:
A249915_list.append(n) # Chai Wah Wu, Apr 29 2015
KEYWORD
nonn,base,changed
AUTHOR
Felix Fröhlich, Apr 21 2015
STATUS
approved
Numbers n such that the decimal expansions of both n and n^2 have 2 as smallest digit and 7 as largest digit.
+10
10
275, 2574, 2725, 2765, 4762, 5725, 6762, 7244, 7262, 23765, 25744, 27244, 27325, 27434, 27465, 27525, 27632, 27665, 47725, 52275, 52376, 52475, 52576, 52675, 57242, 67426, 72266, 72275, 72424, 72426, 72576, 72624, 73325, 73725, 74326, 75725, 233725, 233744
OFFSET
1,1
LINKS
PROG
(PARI) is(n) = vecmin(digits(n))==2 && vecmin(digits(n^2))==2 && vecmax(digits(n))==7 && vecmax(digits(n^2))==7
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 25 2015
STATUS
approved
Numbers n such that the decimal expansions of both n and n^2 have 2 as smallest digit and 8 as largest digit.
+10
10
278, 528, 582, 826, 2385, 2585, 2868, 2872, 2875, 2878, 2885, 4782, 4832, 4872, 5278, 5328, 6872, 7238, 7258, 7268, 7582, 8232, 8266, 8275, 8278, 8284, 8522, 8524, 8528, 8628, 8732, 8822, 23385, 23628, 23782, 23826, 25582, 25668, 25785, 25856, 26238, 26878
OFFSET
1,1
LINKS
MATHEMATICA
fQ[n_] := Block[{d = DigitCount@ n}, Plus @@ Prepend[Take[d, -2], First@ d] == 0 && d[[2]] > 0 && d[[8]] > 0]; Select[Range@ 27000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 27 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==2 && vecmin(digits(n^2))==2 && vecmax(digits(n))==8 && vecmax(digits(n^2))==8
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 25 2015
STATUS
approved
Numbers n such that the decimal expansions of both n and n^2 have 2 as smallest digit and 9 as largest digit.
+10
9
927, 962, 982, 2293, 2393, 2593, 2693, 2792, 2923, 2927, 2932, 2937, 2964, 2973, 2977, 2982, 2983, 4792, 4923, 4927, 5692, 6292, 6923, 6925, 6927, 7923, 7924, 7927, 8792, 8925, 9232, 9233, 9267, 9268, 9273, 9286, 9287, 9288, 9325, 9326, 9327, 9342, 9423, 9427
OFFSET
1,1
LINKS
MATHEMATICA
fQ[n_] := Block[{d = DigitCount@ n}, Plus @@ Join[First@ d, Last@ d] == 0 && d[[2]] > 0 && d[[9]] > 0]; Select[Range@ 10000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 27 2015 *)
s2l9Q[n_]:=Max[IntegerDigits[n]]==9&&Min[IntegerDigits[n]]==2; Select[ Range[ 10000], AllTrue[{#, #^2}, s2l9Q]&] (* Harvey P. Dale, Dec 06 2018 *)
PROG
(PARI) is(n) = vecmin(digits(n))==2 && vecmin(digits(n^2))==2 && vecmax(digits(n))==9 && vecmax(digits(n^2))==9
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 26 2015
STATUS
approved
Numbers n such that the decimal expansions of both n and n^2 have 3 as smallest digit and 7 as largest digit.
+10
8
6734, 67434, 577734, 667334, 745356, 6674334, 6734744, 6756734, 7373376, 7453574, 7466434, 7533576, 66673334, 67345644, 67656734, 74547734, 74656376, 75733576, 666743334, 667335356, 746556344, 5775434474, 6666733334, 6666733576, 6676476434, 7447533576
OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..1000 (n = 71..178 from Giovanni Resta)
MATHEMATICA
fQ[n_] := Block[{d = DigitCount@ n}, Plus @@ Join[Take[d, {1, 2}], Take[d, {8, 10}]] == 0 && d[[3]] > 0 && d[[7]] > 0]; Select[Range@ 1000000, fQ@# && fQ[#^2] &] (* Michael De Vlieger, Apr 27 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==3 && vecmin(digits(n^2))==3 && vecmax(digits(n))==7 && vecmax(digits(n^2))==7
(Python)
from itertools import product, repeat
A257486_list = []
for l in range(12):
....for a in product('34567', repeat = l):
........for b in ('4', '5', '6'):
............s = ''.join(a)+b
............if '3' in s and '7' in s:
................n = int(s)
................if {'3', '7'} <= set(str(n**2)) <= {'3', '4', '5', '6', '7'}:
....................A257486_list.append(n) # Chai Wah Wu, May 02 2015
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 26 2015
EXTENSIONS
a(22)-a(26) from Hiroaki Yamanouchi, May 03 2015 (using Chai Wah Wu's b-file)
STATUS
approved
Numbers n such that the decimal expansions of both n and n^2 have 3 as the digit with the smallest value and 8 as the digit with the largest value.
+10
7
7378, 66834, 67438, 67738, 73874, 86356, 577378, 577438, 586374, 658388, 666834, 667438, 676438, 683874, 683876, 684438, 688374, 738474, 738538, 743878, 744538, 744738, 747378, 747438, 763844, 764438, 765738, 766384, 863388, 863474, 873874, 874378, 875434
OFFSET
1,1
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {1, 2}] == 0, Plus @@ Take[c, {9, 10}] == 0, c[[3]] > 0, c[[8]] > 0]]; Select[Range@ 1000000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, May 05 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==3 && vecmin(digits(n^2))==3 && vecmax(digits(n))==8 && vecmax(digits(n^2))==8
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 27 2015
STATUS
approved

Search completed in 0.008 seconds