cp's OEIS Frontend

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.

Showing 1-4 of 4 results.

A030099 Numbers k such that k^3 has only odd digits.

Original entry on oeis.org

1, 11, 15, 33, 39, 71, 91, 173, 175, 179, 211, 259, 335, 3337, 4631, 5597, 7353, 12415, 21353, 22893, 25799, 69491, 110011, 124975, 199831, 227353, 237151, 462815, 492415, 708415, 1100033, 2393695, 2620611, 5088493, 5828415, 7204417, 8320335, 11164415, 11689633
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (intersect)
    a030099 n = a030099_list !! (n-1)
    a030099_list = filter (null . (intersect "86420") . show . (^ 3)) [1,3..]
    -- Reinhard Zumkeller, Aug 13 2011
  • Mathematica
    fQ[n_] := Union@ OddQ@ IntegerDigits[n^3] == {True}; Select[2 Range[3*10^6] - 1, fQ] (* Robert G. Wilson v, Aug 13 2011 *)
    Select[Range[12*10^6],AllTrue[IntegerDigits[#^3],OddQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 14 2015 *)

A030100 Cubes whose digits are all odd.

Original entry on oeis.org

1, 1331, 3375, 35937, 59319, 357911, 753571, 5177717, 5359375, 5735339, 9393931, 17373979, 37595375, 37159393753, 99317171591, 175333911173, 397551775977, 1913551573375, 9735913353977, 11997979755957, 17171515157399, 335571975137771, 1331399339931331
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[23000]^3,And@@(OddQ/@IntegerDigits[#])&] (* Harvey P. Dale, Aug 20 2011 *)

Formula

a(n) = A030099(n)^3.

A034376 Cubes with all digits even.

Original entry on oeis.org

0, 8, 64, 8000, 64000, 8000000, 8242408, 64000000, 6048464248, 6068404224, 6880682808, 8000000000, 8024024008, 8242408000, 64000000000, 82426462208, 6048464248000, 6068404224000, 6880682808000, 8000000000000, 8002400240008
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[0,20100,2]^3,And@@EvenQ[IntegerDigits[#]]&] (* Harvey P. Dale, Dec 10 2013 *)

Extensions

Offset set to 1 by Giovanni Resta, Mar 13 2020

A353342 Numbers k such that k and k^3 use only even digits.

Original entry on oeis.org

0, 2, 4, 20, 40, 200, 202, 400, 2000, 2002, 2020, 4000, 20000, 20002, 20020, 20200, 40000, 200000, 200002, 200020, 200200, 202000, 400000, 2000000, 2000002, 2000020, 2000200, 2002000, 2020000, 4000000, 20000000, 20000002, 20000020, 20000200, 20000202, 20002000, 20002002, 20020000, 20200000
Offset: 1

Views

Author

Bernard Schott, May 06 2022

Keywords

Comments

Numbers k such that k^3 has only even digits are in A052004.

Crossrefs

Cf. A085597 (similar, but with odd digits).
Intersection of A014263 and A052004.

Programs

  • Mathematica
    seq[ndigmax_] := Module[{nums = Tuples[{0, 2, 4, 6, 8}, ndigmax]}, Select[FromDigits /@ nums, AllTrue[IntegerDigits[#^3], EvenQ] &]]; seq[8] (* Amiram Eldar, May 06 2022 *)
  • Python
    from itertools import count, islice, product
    def agen(): # generator of terms
        for digits in count(1):
            for p in product("02468", repeat=digits):
                if len(p) > 1 and p[0] == "0": continue
                k = int("".join(p))
                if set(str(k**3)) <= set("02468"):
                    yield k
    print(list(islice(agen(), 40))) # Michael S. Branicky, May 06 2022
Showing 1-4 of 4 results.