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-2 of 2 results.

A107128 Divide the even digits of n by 2!.

Original entry on oeis.org

0, 1, 1, 3, 2, 5, 3, 7, 4, 9, 10, 11, 11, 13, 12, 15, 13, 17, 14, 19, 10, 11, 11, 13, 12, 15, 13, 17, 14, 19, 30, 31, 31, 33, 32, 35, 33, 37, 34, 39, 20, 21, 21, 23, 22, 25, 23, 27, 24, 29, 50, 51, 51, 53, 52, 55, 53, 57, 54, 59, 30, 31, 31, 33, 32, 35, 33, 37, 34, 39, 70, 71, 71
Offset: 0

Views

Author

Zak Seidov, May 12 2005

Keywords

Comments

Differs from A026741 starting with 11-term term: A107128(11)=10, A026741(11)=5.

Crossrefs

Cf. A026741.
Cf. A106747.

Programs

  • Haskell
    a107128 n = if n == 0 then 0 else 10 * (a107128 n') + m * d + (1 - m) * d'
                where (d', m) = divMod d 2
                      (n', d) = divMod n 10
    -- Reinhard Zumkeller, Jan 14 2015
    
  • Mathematica
    A107128[n_]:=FromDigits[Map[If[Mod[ #, 2]==0, #/2, # ]&, IntegerDigits[n]]]
    Table[FromDigits[If[EvenQ[#],#/2,#]&/@IntegerDigits[n]],{n,0,80}] (* Harvey P. Dale, Sep 03 2018 *)
  • Python
    def A107128(n): return int(str(n).translate({50:49,52:50,54:51,56:52})) # Chai Wah Wu, Apr 08 2022

A351744 Increment all even digits of n.

Original entry on oeis.org

1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 31, 31, 33, 33, 35, 35, 37, 37, 39, 39, 31, 31, 33, 33, 35, 35, 37, 37, 39, 39, 51, 51, 53, 53, 55, 55, 57, 57, 59, 59, 51, 51, 53, 53, 55, 55, 57, 57, 59, 59, 71, 71, 73, 73, 75, 75, 77, 77
Offset: 0

Views

Author

Alex Ratushnyak, Feb 17 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Array[FromDigits@ Map[If[EvenQ[#], # + 1, #] &, IntegerDigits[#]] &, 78, 0] (* Michael De Vlieger, Feb 17 2022 *)
  • PARI
    a(n) = if (n, fromdigits(apply(x->if(!(x%2),x+1,x), digits(n))), 1); \\ Michel Marcus, Feb 18 2022
  • Python
    for n in range(1000):
      s = str(n)
      res = ''
      for d in s:
        if (int(d) & 1)==0:  d = str(int(d)+1)
        res += d
      print(int(res), end=',')
    
  • Python
    def A351744(n): return int(str(n).translate({48:49,50:51,52:53,54:55,56:57})) # Chai Wah Wu, Apr 07 2022
    
Showing 1-2 of 2 results.