A052004
Numbers k such that k^3 has only even digits.
Original entry on oeis.org
0, 2, 4, 20, 40, 200, 202, 400, 1822, 1824, 1902, 2000, 2002, 2020, 4000, 4352, 18220, 18240, 19020, 20000, 20002, 20020, 20200, 34372, 39154, 40000, 43520, 182200, 182400, 190200, 200000, 200002, 200020, 200200, 202000, 297092, 343720, 391540
Offset: 1
Cf.
A000578,
A034376,
A030099,
A030100,
A030479,
A030483,
A031997,
A076165,
A076166,
A076171,
A137468.
-
Select[ Range[ 500000 ], Union[ EvenQ[ IntegerDigits[ #^3 ] ] ] == {True} & ]
Select[Range[0,400000],AllTrue[IntegerDigits[#^3],EvenQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 15 2017 *)
A076166
Primes p such that sum of cubes of even digits of p equals sum of cubes of odd digits of p.
Original entry on oeis.org
16447, 41467, 41647, 44617, 46147, 46471, 76441, 114451, 144511, 146407, 404167, 404671, 414607, 415141, 416407, 440761, 441607, 451411, 460147, 460417, 461407, 470461, 476041, 476401, 541141, 610447, 640741, 644107, 644701, 647401, 704461, 740461, 746041, 764041
Offset: 1
16447 is OK because 1^3 + 7^3 = 6^3 + 4^3 + 4^3.
14467 has digits in nondecreasing order (is zerofree). Of the 60 permutations, 16447, 41467, 41647, 44617, 46147, 46471, 76441 are prime. - _David A. Corneth_, Dec 11 2018
-
oeQ[n_]:=Module[{idn = IntegerDigits[n]}, Total[Select[idn, OddQ]^3] == Total[ Select[idn, EvenQ]^3]]; Select[Range[100000], PrimeQ[#] && oeQ[#] &] (* Amiram Eldar, Dec 10 2018 after Harvey P. Dale at A076165 *)
-
isok(p) = isprime(p) && (d=digits(p)) && (sum(i=1, #d, d[i]^3*if(d[i]%2, 1, -1))==0); \\ Michel Marcus, Dec 13 2018
Showing 1-2 of 2 results.
Comments