login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A197357 Number of n-digits integers for which the sum of the odd-positioned digits equals the sum of the even-positioned digits. 1
1, 10, 55, 670, 4840, 55252, 436975, 4816030, 40051495, 432457640, 3715101654, 39581170420, 347847754670, 3671331273480, 32811494188975, 343900019857310, 3113537578058979, 32458256583753952, 296896918816556380, 3081918923741896840 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(n) is the number of n-digit integers such that the sum of the odd-positioned digits is equal to the sum of the even-positioned digits, leading zeros being allowed in the integers.

LINKS

Colin Barker, Table of n, a(n) for n = 1..200

EXAMPLE

The number 28754 is one of the 4840 5-digit numbers because 2+7+4 = 8+5.

PROG

(PARI) a(n) = {nb = 0; for (i=0, 10^n-1, digs = digits(i, 10); while(#digs != n, digs = concat(0, digs)); so = 0; forstep(j=1, n, 2, so += digs[j]); se = 0; forstep(j=2, n, 2, se += digs[j]); if (se == so, nb++); ); return (nb); } \\ Michel Marcus, Jun 08 2013

CROSSREFS

This sequence has some numbers in common with both A025015 and A174061. In fact, A174061 consists of the elements a(2n), and the elements a(2n) are all elements of A025015.

Sequence in context: A290359 A030114 A001557 * A164951 A244303 A261848

Adjacent sequences:  A197354 A197355 A197356 * A197358 A197359 A197360

KEYWORD

nonn,base

AUTHOR

Colin Barker, Oct 13 2011

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 November 19 11:09 EST 2019. Contains 329319 sequences. (Running on oeis4.)