login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A343275 a(n) = |2*n - 10^length(n)|. 1
8, 6, 4, 2, 0, 2, 4, 6, 8, 80, 78, 76, 74, 72, 70, 68, 66, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 42, 40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The plot looks like multiple V shapes. A new V shape occurs for each interval n = 10^k .. 10^(k+1)-1, with the bottom of the V at a(5*10^k) = 0.

All terms are even.

LINKS

Rémy Sigrist, Table of n, a(n) for n = 1..9999

Erhan Tezcan, Github Repo includes plots and the code.

FORMULA

a(n) = abs(2*n - 10^A055642(n)).

a(10*n) = 10*a(n).

EXAMPLE

n=10 has length 2, so a(10) = |20-100| = 80.

PROG

(Python)

def a(n : int) -> int:

return abs((n << 1) - (10 ** len(str(n))))

(PARI) a(n) = abs(2*n-10^max(1, #digits(n))) \\ Rémy Sigrist, May 30 2021

CROSSREFS

Cf. A055642.

Sequence in context: A263181 A298978 A199151 * A177154 A059631 A333198

Adjacent sequences: A343272 A343273 A343274 * A343276 A343277 A343278

KEYWORD

nonn,base

AUTHOR

Erhan Tezcan, Apr 10 2021

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 9 00:20 EST 2022. Contains 358698 sequences. (Running on oeis4.)