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.

Previous Showing 31-40 of 67 results. Next

A136904 Numbers k such that k and k^2 use only the digits 0, 2, 4, 6 and 8.

Original entry on oeis.org

0, 2, 8, 20, 22, 68, 80, 200, 202, 220, 262, 668, 680, 800, 2000, 2002, 2020, 2022, 2200, 2202, 2620, 6668, 6680, 6800, 8000, 8262, 20000, 20002, 20020, 20022, 20200, 20220, 20602, 22000, 22002, 22020, 24622, 26200, 66668, 66680, 66800, 68000, 80000, 82620, 200000, 200002, 200020, 200022, 200200, 200202, 200220, 202000, 202002, 202200, 206020
Offset: 1

Views

Author

Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008

Keywords

Comments

Generated with DrScheme.
Subsequence of A014263. - Michel Marcus, Oct 04 2013

Examples

			828268460602^2 = 686028642828006826202404.
		

Crossrefs

Cf. A014263.

Programs

  • Mathematica
    Select[Range[0,206050],AllTrue[Join[IntegerDigits[#],IntegerDigits[#^2]],EvenQ] &] (* Stefano Spezia, Jul 03 2025 *)
  • PARI
    evdigs(n) = {if (n==0, return (1)); digs = digits(n); for (i = 1, #digs, if (digs[i] % 2, return (0));); return (1);}
    isok(n) = evdigs(n) && evdigs(n^2); \\ Michel Marcus, Oct 04 2013

A350538 a(n) is the smallest proper multiple of n which contains only even digits.

Original entry on oeis.org

2, 4, 6, 8, 20, 24, 28, 24, 288, 20, 22, 24, 26, 28, 60, 48, 68, 288, 228, 40, 42, 44, 46, 48, 200, 208, 486, 84, 406, 60, 62, 64, 66, 68, 280, 288, 222, 228, 468, 80, 82, 84, 86, 88, 2880, 460, 282, 240, 686, 200, 204, 208, 424, 486, 220, 224, 228, 406, 826
Offset: 1

Views

Author

Bernard Schott, Jan 05 2022

Keywords

Comments

Inspired by the problem 1/2 of International Mathematical Talent Search, round 2 (see link).
Differs from A061807 when n is in A014263. - Michel Marcus, Jan 05 2022

Examples

			a(9) = 288 = 32 * 9 is the smallest multiple of 9 which contains only even digits.
		

Crossrefs

Terms belong to A014263.

Programs

  • Mathematica
    a[n_] := Module[{k = 2*n}, While[! AllTrue[IntegerDigits[k], EvenQ], k += n]; k]; Array[a, 60] (* Amiram Eldar, Jan 05 2022 *)
  • PARI
    a(n) = my(k=2); while(#select(x->((x%2) == 1), digits(k*n)), k++); k*n; \\ Michel Marcus, Jan 12 2022
  • Python
    def a(n):
        m, inc = 2*n, n if n%2 == 0 else 2*n
        while not set(str(m)) <= set("02468"): m += inc
        return m
    print([a(n) for n in range(1, 60)]) # Michael S. Branicky, Jan 05 2022
    
  • Python
    from itertools import count, product
    def A350538(n):
        for l in count(len(str(n))-1):
            for a in '2468':
                for b in product('02468',repeat=l):
                    k = int(a+''.join(b))
                    if k > n and k % n == 0:
                        return k # Chai Wah Wu, Jan 12 2022
    

Extensions

More terms from Michael S. Branicky, Jan 05 2022

A351893 Numbers that contain only even digits in their factorial-base representation.

Original entry on oeis.org

0, 4, 12, 16, 48, 52, 60, 64, 96, 100, 108, 112, 240, 244, 252, 256, 288, 292, 300, 304, 336, 340, 348, 352, 480, 484, 492, 496, 528, 532, 540, 544, 576, 580, 588, 592, 1440, 1444, 1452, 1456, 1488, 1492, 1500, 1504, 1536, 1540, 1548, 1552, 1680, 1684, 1692, 1696
Offset: 1

Views

Author

Amiram Eldar, Feb 24 2022

Keywords

Comments

All the terms are multiples of 4 (A008586).

Examples

			4 is a term since its factorial-base presentation, 20, has only even digits.
16 is a term since its factorial-base presentation, 220, has only even digits.
		

Crossrefs

Subsequence: A052849 \ {2}.
Similar sequences: A005823 (ternary), A014263 (decimal), A062880 (quaternary).

Programs

  • Mathematica
    max = 7; fctBaseDigits[n_] := IntegerDigits[n, MixedRadix[Range[max, 2, -1]]]; Select[Range[0, max!, 2], AllTrue[fctBaseDigits[#], EvenQ] &]

A007957 Numbers that contain an odd digit.

Original entry on oeis.org

1, 3, 5, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 43, 45, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 63, 65, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 83, 85, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100
Offset: 1

Views

Author

R. Muller

Keywords

Comments

Complement of A014263; A196564(a(n)) > 0; A103181(a(n)) > 0. - Reinhard Zumkeller, Oct 04 2011

Crossrefs

Programs

  • Haskell
    import Data.List (findIndices)
    a007957 n = a007957_list !! (n-1)
    a007957_list = findIndices (> 0) a196564_list
    a196564 n = length [d | d <- show n, d `elem` "13579"]
    a196564_list = map a196564 [0..]
    -- Reinhard Zumkeller, Oct 04 2011
    
  • Mathematica
    Select[Range[100],Count[IntegerDigits[#],?OddQ]>0&] (* _Harvey P. Dale, Sep 06 2017 *)
  • PARI
    is(n)=my(v=vecsort(eval(Vec(Str(n)))%2,,8));v[#v] \\ Charles R Greathouse IV, Jul 25 2012

Formula

a(n) = n + O(n^0.69897...) where the constant is A153268. - Charles R Greathouse IV, Jul 25 2012

A103181 In decimal representation of n: replace all even digits with 0 and all odd digits with 1.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 0, 1, 0, 1, 0, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 18 2005

Keywords

Examples

			199->'111': a(199)=111; 200->'000': a(200)=0;
299->'011': a(299)=11; 300->'100': a(300)=100.
		

Crossrefs

Programs

  • Haskell
    import Data.List (unfoldr); import Data.Tuple (swap)
    a103181_list = map a103181 [0..]
    a103181 n = foldl f 0 $ reverse $ unfoldr g n where
       f v d = 10 * v + mod d 2
       g x = if x == 0 then Nothing else Just $ swap $ divMod x 10
    -- Reinhard Zumkeller, Oct 04 2011
    
  • Mathematica
    Table[FromDigits[If[EvenQ[#],0,1]&/@IntegerDigits[n]],{n,0,90}] (* Harvey P. Dale, Nov 08 2022 *)
  • PARI
    a(n)=subst(Pol(apply(k->k%2, digits(n))),'x,10) \\ Charles R Greathouse IV, Jul 16 2013
    
  • Python
    def A103181(n): return int(''.join(str(int(d) % 2) for d in str(n))) # Chai Wah Wu, Apr 09 2022

Formula

n = Sum(d(k)*10^k: 0<=d(k)<10) -> a(n) = Sum((d(k) mod 2)*10^k).
a(A014263(n)) = 0. - Reinhard Zumkeller, Oct 04 2011

A168501 Numbers without the decimal digits 2, 4 and 6.

Original entry on oeis.org

0, 1, 3, 5, 7, 8, 9, 10, 11, 13, 15, 17, 18, 19, 30, 31, 33, 35, 37, 38, 39, 50, 51, 53, 55, 57, 58, 59, 70, 71, 73, 75, 77, 78, 79, 80, 81, 83, 85, 87, 88, 89, 90, 91, 93, 95, 97, 98, 99, 100, 101, 103, 105, 107, 108, 109, 110, 111, 113, 115, 117, 118, 119, 130, 131, 133
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 27 2009

Keywords

Comments

Numbers that contain non-single or nonisolated digits only (see the first seven values of A167707 for the digits that are not 2, 4, or 6).

Crossrefs

Programs

  • Magma
    [n: n in [0..200] | IsEmpty(Set([2,4,6]) meet Set(Intseq(n)))]; // Bruno Berselli, Jul 25 2016
  • Mathematica
    Select[Select[Select[Range[0, 4500], FreeQ[IntegerDigits@#, 2] &], FreeQ[IntegerDigits@#, 4] &], FreeQ[IntegerDigits@#, 6] &] (* G. C. Greubel, Jul 24 2016 *)

Extensions

Corrected (114 removed) by R. J. Mathar, Jun 04 2010

A342846 Number of distinct odd numbers visible as proper substrings of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2
Offset: 1

Views

Author

Sean A. Irvine, Mar 24 2021

Keywords

Comments

Here substrings are contiguous.
a(A164766(n)) = n and a(m) <> n for m < A164766(n); a(A014263(n)) = 0. - Reinhard Zumkeller, Aug 25 2009

Examples

			a(10)=1 since we can see 1 as a proper substring of 10.
a(105)=2 since we can see 1, 5.
a(132)=3 because we can see 1, 3, 13.
		

Crossrefs

Programs

  • Haskell
    import Data.List (isInfixOf)
    a045888 n = length $ filter (`isInfixOf` (show n)) $ map show [1, 3..n-1]
    -- Reinhard Zumkeller, Jul 19 2011
    
  • Python
    def a(n):
      s, eset = str(n), set()
      for i in range(len(s)):
        for j in range(i+1, len(s)+1):
          if s[j-1] in "13579" and j-i < len(s): # odd and proper substring
            eset.add(int(s[i:j]))
      return len(eset)
    print([a(n) for n in range(1, 105)]) # Michael S. Branicky, Mar 24 2021

A067044 Smallest positive k such that k*n contains only even digits.

Original entry on oeis.org

2, 1, 2, 1, 4, 1, 4, 1, 32, 2, 2, 2, 2, 2, 4, 3, 4, 16, 12, 1, 2, 1, 2, 1, 8, 1, 18, 1, 14, 2, 2, 2, 2, 2, 8, 8, 6, 6, 12, 1, 2, 1, 2, 1, 64, 1, 6, 1, 14, 4, 4, 4, 8, 9, 4, 4, 4, 7, 14, 1, 4, 1, 14, 1, 4, 1, 4, 1, 12, 4, 4, 4, 28, 3, 8, 3, 6, 6, 34, 1, 6, 1, 8, 1, 8, 1, 24, 1, 32, 32, 22, 5, 22, 3
Offset: 1

Views

Author

Amarnath Murthy, Dec 29 2001

Keywords

Comments

No multiple of 10 can appear in this sequence. - M. F. Hasler, Mar 07 2025

Examples

			a(7) = 4 as among the multiples of 7 (i.e., 7, 14, 21, 28...), 28 is the smallest multiple with only even digits and a(7)= 28/7 = 4.
a(16) = 3 is the first odd term > 1, a(n = 54, 58, 74, 76, 92, 94, 96, 98, ...) are the next examples, cf. A380874. - _M. F. Hasler_, Mar 03 2025
		

Crossrefs

Cf. A014263 (numbers with only even digits), A007091 (numbers in base 5).

Programs

  • Mathematica
    Table[k = n; While[Length[Intersection[{1, 3, 5, 7, 9}, IntegerDigits[k]]] > 0, k = k + n]; k/n, {n, 100}] (* T. D. Noe, Jun 03 2013 *)
    sk[n_]:=Module[{k=1},While[!AllTrue[IntegerDigits[k*n],EvenQ],k++];k]; Array[sk,100] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 27 2015 *)
  • PARI
    apply( {A067044(n, f=1+n%2)=forstep(a=f*n, oo, f*n, digits(a)%2||return(a/n))}, [1..99]) \\ M. F. Hasler, Mar 03 2025
    
  • Python
    A067044 = lambda n: next(k for k in range(1+n%2, 9<<99, 1+n%2)if not any(int(d)&1 for d in str(n*k))) # M. F. Hasler, Mar 03 2025

Formula

From M. F. Hasler, Mar 07 2025: (Start)
There is an explicit formula for many values of n:
a(n) = 1 if n has only even digits <=> n is in A014263, else:
a(n) = 2 if n has only digits < 5 <=> n is in A007091;
a(m*(10^k-1)) = 8*round(10^k/6)^2/m for m = 1, 2, 4 or 8 and any k > 0;
a(5*(10^k-1)) = 16*round(10^k/6)^2 for any k > 0;
a(50*m + {5 or 15}) = 4 if m has all digits < 5. (End)

Extensions

More terms from Eli McGowan (ejmcgowa(AT)mail.lakeheadu.ca), May 06 2002
Data corrected by Paul Tek, Jun 03 2013

A071241 Arithmetic mean of k and R(k) where k is the n-th nonnegative number using only even digits and R(k) is its digit reversal (A004086).

Original entry on oeis.org

0, 2, 4, 6, 8, 11, 22, 33, 44, 55, 22, 33, 44, 55, 66, 33, 44, 55, 66, 77, 44, 55, 66, 77, 88, 101, 202, 303, 404, 505, 121, 222, 323, 424, 525, 141, 242, 343, 444, 545, 161, 262, 363, 464, 565, 181, 282, 383, 484, 585, 202, 303, 404, 505, 606, 222, 323, 424, 525
Offset: 0

Views

Author

Amarnath Murthy, May 20 2002

Keywords

Comments

Conjecture: 101 is the largest prime term, the only other primes being 2 and 11.
The conjecture is false: for example, 181 and 383 are prime terms. There are 150 prime terms less than 75000. - Harvey P. Dale, Sep 02 2016

Crossrefs

Programs

  • Maple
    reversal := proc(n) local i, len, new, temp: new := 0: temp := n: len := floor(log[10](n+.1))+1: for i from 1 to len do new := new+irem(temp, 10)*10^(len-i): temp := floor(temp/10): od: RETURN(new): end: alleven := proc(n) local i, flag, len, temp: temp := n: flag := 1: if n=0 then flag := 0 fi: len := floor(log[10](n+.1))+1: for i from 1 to len do if irem(temp, 10) mod 2 = 0 then temp := floor(temp/10) else flag := 0 fi: od: RETURN(flag): end: for n from 0 to 500 by 2 do if alleven(n) = 1 then printf(`%d,`,(n+reversal(n))/2) fi: od: # James Sellers, May 28 2002
  • Mathematica
    Mean[{#,IntegerReverse[#]}]&/@(FromDigits/@Tuples[{0,2,4,6,8},3]) (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 02 2016 *)

Formula

{k + R(k)}/2 where k uses only odd digits 0, 2, 4, 6 and 8.
a(n) = (A014263(n) + A004086(A014263(n))) / 2. - Sean A. Irvine, Jul 06 2024

Extensions

More terms from James Sellers, May 28 2002
Corrected by Harvey P. Dale, Sep 02 2016

A117978 Triangular numbers with only even digits.

Original entry on oeis.org

0, 6, 28, 66, 406, 666, 820, 2080, 2628, 8646, 28680, 42486, 48828, 64620, 66066, 80200, 84666, 200028, 204480, 228826, 264628, 288420, 426426, 446040, 468028, 484620, 600060, 626640, 644680, 686206, 828828, 886446, 2222886, 2248260, 2862028, 2888406
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), May 03 2006

Keywords

Comments

There are infinitely many terms. For example all 88...88 6 44...44 6 with an equal number of 8's and 4's (their triangular indices being A185127). - Shyam Sunder Gupta, Aug 16 2025

Crossrefs

Intersection of A000217 and A014263.

Programs

Extensions

Corrected (a(32) was in error) and extended by Harvey P. Dale, Oct 21 2011
Previous Showing 31-40 of 67 results. Next