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!)
A303789 a(n) = Sum_{i=0..m} d(i)*6^i, where Sum_{i=0..m} d(i)*7^i is the base-7 representation of n. 3
0, 1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 12, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24, 24, 25, 26, 27, 28, 29, 30, 30, 31, 32, 33, 34, 35, 36, 36, 37, 38, 39, 40, 41, 42, 36, 37, 38, 39, 40, 41, 42, 42, 43, 44, 45, 46, 47, 48, 48, 49, 50, 51, 52, 53, 54, 54, 55 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
19 = 25_7, so a(19) = 2*6 + 5 = 17.
20 = 26_7, so a(20) = 2*6 + 6 = 18.
21 = 30_7, so a(21) = 3*6 + 0 = 18.
22 = 31_7, so a(22) = 3*6 + 1 = 19.
PROG
(Ruby)
def f(k, ary)
(0..ary.size - 1).inject(0){|s, i| s + ary[i] * k ** i}
end
def A(k, n)
(0..n).map{|i| f(k, i.to_s(k + 1).split('').map(&:to_i).reverse)}
end
p A(6, 100)
(PARI) a(n) = fromdigits(digits(n, 7), 6); \\ Michel Marcus, May 02 2018
CROSSREFS
Sum_{i=0..m} d(i)*b^i, where Sum_{i=0..m} d(i)*(b+1)^i is the base (b+1) representation of n: A065361 (b=2), A215090 (b=3), A303787 (b=4), A303788 (b=5), this sequence (b=6).
Cf. A037470.
Sequence in context: A245337 A006164 A053758 * A145569 A213851 A172475
KEYWORD
nonn,base
AUTHOR
Seiichi Manyama, Apr 30 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 April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)