A104692 Numbers n such that in n^3, number of odd digits is less than number of even digits.
2, 4, 6, 10, 14, 16, 20, 22, 24, 29, 30, 32, 35, 36, 38, 40, 41, 42, 44, 50, 52, 60, 61, 62, 63, 64, 65, 66, 70, 74, 80, 86, 88, 90, 92, 94, 96, 100, 102, 104, 107, 112, 113, 114, 116, 118, 120, 122, 123, 124, 126, 127, 129, 130, 131, 132, 134, 135
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
EvedQ[n_]:= Module[{idn3 = IntegerDigits[n^3]}, Count[idn3, ?OddQ] < Count[idn3, ?EvenQ]]; Select[Range[2000], EvedQ] (* G. C. Greubel, Aug 14 2018 *)
-
PARI
isok(n) = my(d = digits(n^3)); sum(i=1, #d, d[i] % 2) < sum(i=1, #d, 1 - (d[i] % 2)); \\ Michel Marcus, Oct 05 2013
Extensions
More terms from Michel Marcus, Oct 05 2013
Comments