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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A100830 Smallest number with same digital root as n but distinct from n and all earlier occurrences. 1
10, 11, 12, 13, 14, 15, 16, 17, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 28, 29, 30, 31, 32, 33, 34, 35, 36, 19, 20, 21, 22, 23, 24, 25, 26, 27, 46, 47, 48, 49, 50, 51, 52, 53, 54, 37, 38, 39, 40, 41, 42, 43, 44, 45, 64, 65, 66, 67, 68, 69, 70, 71, 72, 55, 56, 57, 58, 59, 60, 61, 62, 63 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
A010888(a(n)) = A010888(n) and a(n)<>n;
a(a(n))=n: self-inverse permutation of the natural numbers.
LINKS
FORMULA
a(n) = n + 9*(-1)^floor((n-1)/9).
From Colin Barker, Sep 24 2019: (Start)
G.f.: x*(10 - 9*x - 8*x^9 + 9*x^10) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 - x^3 + x^6)).
a(n) = 2*a(n-1) - a(n-2) - a(n-9) + 2*a(n-10) - a(n-11) for n>11.
(End)
MATHEMATICA
LinearRecurrence[{2, -1, 0, 0, 0, 0, 0, 0, -1, 2, -1}, {10, 11, 12, 13, 14, 15, 16, 17, 18, 1, 2}, 72] (* Metin Sariyar, Sep 24 2019 *)
Rest[CoefficientList[Series[x (10-9x-8x^9+9x^10)/((1-x)^2(1+x)(1-x+x^2)(1-x^3+x^6)), {x, 0, 80}], x]] (* Harvey P. Dale, Jul 20 2021 *)
PROG
(Haskell)
a100830 n = n + 9 * (-1) ^ ((n - 1) `div` 9)
-- Reinhard Zumkeller, Aug 01 2014
(PARI) Vec(x*(10 - 9*x - 8*x^9 + 9*x^10) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 - x^3 + x^6)) + O(x^80)) \\ Colin Barker, Sep 24 2019
CROSSREFS
Sequence in context: A342367 A303879 A305947 * A180176 A350494 A168100
KEYWORD
nonn,base,easy
AUTHOR
Reinhard Zumkeller, Jan 07 2005
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 April 24 17:29 EDT 2024. Contains 371962 sequences. (Running on oeis4.)