Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A119281
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A119281 Number of counting rods to represent n in the ancient Chinese rod numeral system. +0
1
0, 1, 2, 3, 4, 5, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 5, 6, 7, 8, 4, 5, 6, 7, 8, 9, 6, 7, 8, 9, 5, 6, 7, 8, 9, 10, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 5, 6, 7, 8, 4, 5, 6, 7, 8, 9, 6, 7, 8, 9, 5, 6, 7, 8, 9, 10, 7, 8, 9, 10, 1, 2, 3 (list; graph; listen)
OFFSET

0,3

COMMENT

Contrast with A092196, the number of letters to represent n in ancient Roman numerals. Negative numbers were represented by the same number of rods but usually of a different color (usually black rods with red rods for positive numbers). It's unclear to me whether 0 itself was ever formally considered represented by the absence of all counting rods, but it does seem reasonable that a(0)=0 from the example below.

LINKS

Wikipedia, Chinese numerals

Wikipedia, Counting rods

FORMULA

a(n) = a(-n) = A007953(n) - 4*A102677(n) = A092196(n) + 4*(number of 5s in n).

EXAMPLE

a(105) = 6 because 105 was represented on a counting board by placing one counting rod in the compartment for hundreds, no rods where those representing tens were normally placed and five rods in the units compartment.

PROGRAM

(PARI) a(n)= tmp=abs(n); r=0; l=length(Str(tmp)); for(k=1, l, d=tmp-(tmp\10)*10; tmp=tmp\10; if(d<6, r=r+d, r=r+d-4)); r

CROSSREFS

Cf. A092196, A007953, A102677.

Adjacent sequences: A119278 A119279 A119280 this_sequence A119282 A119283 A119284

Sequence in context: A165072 A141404 A070671 this_sequence A070772 A094937 A161768

KEYWORD

base,easy,nonn

AUTHOR

Rick L. Shepherd (rshepherd2(AT)hotmail.com), May 12 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 8 20:39 EST 2009. Contains 166234 sequences.


AT&T Labs Research