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.

A351744 Increment all even digits of n.

This page as a plain text file.
%I A351744 #19 May 30 2025 11:01:14
%S A351744 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,
%T A351744 37,37,39,39,31,31,33,33,35,35,37,37,39,39,51,51,53,53,55,55,57,57,59,
%U A351744 59,51,51,53,53,55,55,57,57,59,59,71,71,73,73,75,75,77,77
%N A351744 Increment all even digits of n.
%t A351744 Array[FromDigits@ Map[If[EvenQ[#], # + 1, #] &, IntegerDigits[#]] &, 78, 0] (* _Michael De Vlieger_, Feb 17 2022 *)
%o A351744 (Python)
%o A351744 for n in range(1000):
%o A351744   s = str(n)
%o A351744   res = ''
%o A351744   for d in s:
%o A351744     if (int(d) & 1)==0:  d = str(int(d)+1)
%o A351744     res += d
%o A351744   print(int(res), end=',')
%o A351744 (Python)
%o A351744 def A351744(n): return int(str(n).translate({48:49,50:51,52:53,54:55,56:57})) # _Chai Wah Wu_, Apr 07 2022
%o A351744 (PARI) a(n) = if (n, fromdigits(apply(x->if(!(x%2),x+1,x), digits(n))), 1); \\ _Michel Marcus_, Feb 18 2022
%Y A351744 Cf. A001613, A306436, A106747.
%K A351744 nonn,base
%O A351744 0,3
%A A351744 _Alex Ratushnyak_, Feb 17 2022