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!)
A319839 Smallest fixed points (>0) of the base-2*n Kaprekar map. 2
9, 30, 105, 21, 495, 858, 65, 2040, 2907, 133, 5313, 6900, 225, 10962, 13485, 341, 19635, 23310, 481, 31980, 37023, 645, 48645, 55272, 833, 70278, 78705, 1045, 97527, 107970, 1281, 131040, 143715, 1541, 171465, 186588, 1825, 219450, 237237, 2133, 275643, 296310, 2465 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) = A319798(2*n).
PROG
(Ruby)
def f(k, n)
ary = []
while n > 0
ary << n % k
n /= k
end
ary
end
def g(k, ary)
(0..ary.size - 1).inject(0){|s, i| s + ary[i] * k ** i}
end
def A319798(n)
i = 1
ary = [1]
while g(n, ary) - g(n, ary.reverse) != i
i += 1
ary = f(n, i).sort
end
i
end
def A319839(n)
(1..n).map{|i| A319798(2 * i)}
end
p A319839(20)
CROSSREFS
Sequence in context: A301988 A334853 A212517 * A274998 A000440 A300643
KEYWORD
nonn,base,look
AUTHOR
Seiichi Manyama, Sep 29 2018
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 May 7 02:37 EDT 2024. Contains 372300 sequences. (Running on oeis4.)