

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: selfinverse permutation of the natural numbers.


LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Index entries for sequences that are permutations of the natural numbers
Index entries for linear recurrences with constant coefficients, signature (2,1,0,0,0,0,0,0,1,2,1).


FORMULA

a(n) = n + 9*(1)^floor((n1)/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(n1)  a(n2)  a(n9) + 2*a(n10)  a(n11) 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 *)


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: A303657 A303879 A305947 * A180176 A168100 A088475
Adjacent sequences: A100827 A100828 A100829 * A100831 A100832 A100833


KEYWORD

nonn,base,easy


AUTHOR

Reinhard Zumkeller, Jan 07 2005


STATUS

approved



