login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A319021 Next larger integer with same sum of digits in base 3 as n. 2
3, 4, 9, 6, 7, 10, 11, 14, 27, 12, 13, 18, 15, 16, 19, 20, 23, 28, 21, 22, 29, 24, 25, 32, 35, 44, 81, 30, 31, 36, 33, 34, 37, 38, 41, 54, 39, 40, 45, 42, 43, 46, 47, 50, 55, 48, 49, 56, 51, 52, 59, 62, 71, 82, 57, 58, 63, 60, 61, 64, 65, 68, 83, 66, 67, 72 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

This sequence is the base 3 variant of A057168 (base 2) and of A228915 (base 10).

All integers except those in A062318 appear in this sequence.

LINKS

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

FORMULA

a(3^k) = 3^(k+1) for any k >= 0.

A053735(a(n)) = A053735(n).

EXAMPLE

The first terms, alongside the ternary representations of n and of a(n), are:

  n   a(n)  ter(n)  ter(a(n))

  --  ----  ------  ---------

   1     3      1     10

   2     4      2     11

   3     9     10    100

   4     6     11     20

   5     7     12     21

   6    10     20    101

   7    11     21    102

   8    14     22    112

   9    27    100   1000

  10    12    101    110

  11    13    102    111

  12    18    110    200

  13    15    111    120

  14    16    112    121

  15    19    120    201

PROG

(PARI) a(n, base=3) = my (c=0); for (w=0, oo, my (d=n % base); if (d+1 < base && c, return ((n+1)*base^w + ((c-1)%(base-1) + 1)*base^((c-1)\(base-1))-1), c += d; n \= base))

CROSSREFS

Cf. A053735, A057168, A062318, A228915.

Sequence in context: A227717 A021290 A016656 * A249187 A084425 A168512

Adjacent sequences:  A319018 A319019 A319020 * A319022 A319023 A319024

KEYWORD

nonn,base

AUTHOR

Rémy Sigrist, Sep 08 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 19 23:44 EDT 2019. Contains 328244 sequences. (Running on oeis4.)