login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A273892 Numbers starting with an even (decimal) digit. 1
0, 2, 4, 6, 8, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

For positive terms, a number is a term iff the first digit is even. Therefore, for k > 0, there are 4 * 10^(k - 1) terms having precisely k digits. - David A. Corneth, Jun 02 2016

LINKS

Bruno Berselli, Table of n, a(n) for n = 1..1000

EXAMPLE

21 is a term because 2 is an even number. - Altug Alkan, Jun 02 2016

MATHEMATICA

Select[Range[0, 219], EvenQ@ FromDigits@ Reverse@ IntegerDigits@ # &] (* or *) {0} ~ Join ~ Select[Range@ 219, EvenQ@ Floor[#/10^Floor@ Log10@ #] &] (* Michael De Vlieger, Jun 03 2016 *)

PROG

(PARI) A004086(n) = eval(concat(Vecrev(Str(n)))); lista(nn) = for(n=0, nn, if(A004086(n) % 2 == 0, print1(n, ", "))); \\ Altug Alkan, Jun 02 2016

(PARI) a(n)=if(n==1, return(0), n--; k = logint(9*n\4, 10)); n -= 4 * ((10^k - 1) / 9); n--; 2 * (n \ 10^k + 1)*10^k+n%10^k

is(n) = n==0||digits(n)[1]%2==0 \\ David A. Corneth, Jun 02 2016

(MAGMA) [0] cat [n: n in [1..220] | IsEven(Intseq(n)[#Intseq(n)])]; // Bruno Berselli, Jun 15 2016

CROSSREFS

Cf. A004086, A005843.

Sequence in context: A076402 A053198 A249278 * A179082 A194376 A062897

Adjacent sequences:  A273889 A273890 A273891 * A273893 A273894 A273895

KEYWORD

nonn,easy,base

AUTHOR

Giovanni Teofilatto, Jun 02 2016

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 18:48 EDT 2020. Contains 334854 sequences. (Running on oeis4.)