Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A092384
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A092384 Sum of digits of n if n even, else sum of digits of 2n. +0
3
0, 2, 2, 6, 4, 1, 6, 5, 8, 9, 1, 4, 3, 8, 5, 3, 7, 7, 9, 11, 2, 6, 4, 10, 6, 5, 8, 9, 10, 13, 3, 8, 5, 12, 7, 7, 9, 11, 11, 15, 4, 10, 6, 14, 8, 9, 10, 13, 12, 17, 5, 3, 7, 7, 9, 2, 11, 6, 13, 10, 6, 5, 8, 9, 10, 4, 12, 8, 14, 12, 7, 7, 9, 11, 11, 6, 13, 10, 15, 14, 8, 9, 10, 13, 12, 8, 14, 12, 16 (list; graph; listen)
OFFSET

0,2

COMMENT

Inspired by Luhn algorithm for validating credit cards.

FORMULA

a(n) = sum of digits(if even n then n else 2n)

EXAMPLE

a(11) = 4 = 2 + 2 (2 and 2 are the digits in 22 = 2 * 11)

a(12) = 3 = 1 + 2 (1 and 2 are the digits in 12)

MATHEMATICA

f[n_] := Plus @@ IntegerDigits[ If[ EvenQ[n], n, 2n]]; Table[ f[n], {n, 0, 90}] (from Robert G. Wilson v Mar 24 2004)

CROSSREFS

Cf. A092383, A093150.

Sequence in context: A129889 A130712 A130728 this_sequence A061915 A138565 A137316

Adjacent sequences: A092381 A092382 A092383 this_sequence A092385 A092386 A092387

KEYWORD

easy,nonn,base

AUTHOR

Semaphore Corporation (help(AT)semaphorecorp.com), Mar 20 2004

EXTENSIONS

Corrected and extended by Ray Chandler (rayjchandler(AT)sbcglobal.net), Mar 21 2004

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 December 13 23:45 EST 2009. Contains 170824 sequences.


AT&T Labs Research