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.

A251853 Nonnegative numbers n with all even digits such that the digital sum of the digits' sum is even.

This page as a plain text file.
%I A251853 #56 Feb 22 2018 16:05:09
%S A251853 0,2,4,6,8,20,22,24,26,40,42,44,60,62,80,200,202,204,206,220,222,224,
%T A251853 240,242,260,400,402,404,420,422,440,488,600,602,620,668,686,688,800,
%U A251853 848,866,868,884,886,888,2000,2002,2004,2006,2020,2022,2024,2040,2042,2060,2200
%N A251853 Nonnegative numbers n with all even digits such that the digital sum of the digits' sum is even.
%H A251853 Michael De Vlieger, <a href="/A251853/b251853.txt">Table of n, a(n) for n = 1..10000</a>
%F A251853 Each digit in n is divisible by two, n is divisible by 2, the sum S of the digits of n is divisible by 2, and the sum of the digits of S is also divisible by 2.
%e A251853 2288 is in the sequence because it is even, 2 and 8 are even, 2 + 2 + 8 + 8 = 20 is even, and 2 + 0 = 2 is even.
%t A251853 a251853[n_Integer] := Module[{digitSum}, digitSum[x_] := Plus @@ IntegerDigits[x]; Select[Range[n], And[And @@ EvenQ@IntegerDigits[#], EvenQ@digitSum[#], EvenQ@Nest[digitSum, #, 2]] &]]; a251853[2200] (* _Michael De Vlieger_, Dec 11 2014 *)
%o A251853 (PARI) isevend(v) = for (i=1, #v, if (v[i] % 2, return (0))); return (1);
%o A251853 isok(n) = isevend(digits(n)) && ((sumdigits(sumdigits(n)) % 2) == 0); \\ _Michel Marcus_, Dec 11 2014
%o A251853 (Sage)
%o A251853 [x for x in [0..2200] if prod([is_even(i) for i in x.digits()]) and sum(Integer(sum(x.digits())).digits())%2==0] # _Tom Edgar_, Dec 10 2014
%o A251853 (Python)
%o A251853 A251853_list = [int(''.join(d)) for d in product('02468',repeat=4) if not sum(int(y) for y in str(sum(int(x) for x in d))) % 2] # _Chai Wah Wu_, Dec 20 2014
%Y A251853 Cf. A007953, A014263, A054683.
%K A251853 nonn,base
%O A251853 1,2
%A A251853 _Chase Fortier_, Dec 09 2014