cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 15 results. Next

A079000 a(n) is taken to be the smallest positive integer greater than a(n-1) which is consistent with the condition "n is a member of the sequence if and only if a(n) is odd".

Original entry on oeis.org

1, 4, 6, 7, 8, 9, 11, 13, 15, 16, 17, 18, 19, 20, 21, 23, 25, 27, 29, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 95, 97
Offset: 1

Views

Author

Matthew Vandermast, Feb 01 2003

Keywords

Comments

a(a(n)) = 2n + 3 for n>1.

Examples

			a(2) cannot be 2 because 2 is even; it cannot be 3 because that would require 2 to be a member of the sequence. Hence a(2)=4 and the next odd member of the sequence is the fourth member.
		

References

  • Hsien-Kuei Hwang, S Janson, TH Tsai, Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications, Preprint, 2016; http://140.109.74.92/hk/wp-content/files/2016/12/aat-hhrr-1.pdf. Also Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47; DOI: 10.1145/3127585
  • N. J. A. Sloane, Seven Staggering Sequences, in Homage to a Pied Puzzler, E. Pegg Jr., A. H. Schoen and T. Rodgers (editors), A. K. Peters, Wellesley, MA, 2009, pp. 93-110.

Crossrefs

Partial sums give A080566. Differences give A079948.

Programs

  • Maple
    Digits := 50; A079000 := proc(n) local k,j; if n<=2 then n^2; else k := floor(evalf(log( (n+3)/6 )/log(2)) ); j := n-(9*2^k-3); 12*2^k-3+3*j/2 +abs(j)/2; fi; end;
    A002264 := n->floor(n/3): A079944 := n->floor(log[2](4*(n+2)/3))-floor(log[2](n+2)): A000523 := n->floor(log[2](n)): f := n->A079944(A002264(n-4)): g := n->A000523(A002264(n+2)/2): A079000 := proc(n) if n>3 then RETURN(simplify(3*n+3-3*2^g(n)+(-1)^f(n)*(9*2^g(n)-n-3))/2) else if n>0 then RETURN([1,4,6][n]) else RETURN(0) fi fi: end;
  • Mathematica
    a[1] = 1; a[n_] := (k = Floor[Log[2, (n+3)/6]]; j = n-(9*2^k - 3); 12*2^k-3 + 3*j/2 + Abs[j]/2); Table[a[n], {n, 1, 71}] (* Jean-François Alcover, May 21 2012, after Maple *)

Formula

a(1) = 1, a(2) = 4, then a(9*2^k-3+j) = 12*2^k-3+3*j/2+|j|/2 for k>=0, -3*2^k <= j <= 3*2^k. Also a(3n) = 3*b(n/3), a(3n+1) = 2*b(n)+b(n+1), a(3n+2) = b(n)+2*b(n+1) for n>=2, where b = A079905. - N. J. A. Sloane and Benoit Cloitre, Feb 20 2003
a(n+1) - 2*a(n) + a(n-1) = 1 for n = 9*2^k - 3, k>=0, = -1 for n = 2 and 3*2^k-3, k>=1 and = 0 otherwise.
a(n) = (3*n + 3 - 3*2^g(n) + (-1)^f(n)*(9*2^g(n) - n - 3))/2 for n>3, f(n) = A079944(A002264(n-4)) and g(n) = A000523(A002264(n+2)/2). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 23 2003
Also a(n) = n + 3*2^A000523(A002264(n+2)/2)*(1 - 3*A080584(n-4)) + A080584(n-4)*(n+3) for n>3, where A080584(n)=A079944(A002264(n)). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 24 2003

A007378 a(n), for n >= 2, is smallest positive integer which is consistent with sequence being monotonically increasing and satisfying a(a(n)) = 2n.

Original entry on oeis.org

3, 4, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 20, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 36, 38, 40, 42, 44, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 97, 98, 99, 100, 101, 102, 103
Offset: 2

Views

Author

Keywords

Comments

This is the unique monotonic sequence {a(n)}, n>=2, satisfying a(a(n)) = 2n.
May also be defined by: a(n), n=2,3,4,..., is smallest positive integer greater than a(n-1) which is consistent with the condition "n is a member of the sequence if and only if a(n) is an even number >= 4". - N. J. A. Sloane, Feb 23 2003
A monotone sequence satisfying a^(k+1)(n) = mn is unique if m=2, k >= 0 or if (k,m) = (1,3). See A088720. - Colin Mallows, Oct 16 2003
Numbers (greater than 2) whose binary representation starts with "11" or ends with "0". - Franklin T. Adams-Watters, Jan 17 2006
Lower density 2/3, upper density 3/4. - Charles R Greathouse IV, Dec 14 2022

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A003605. Equals A080653 + 2.
This sequence, A079905, A080637 and A080653 are all essentially the same.

Programs

  • Maple
    a := proc(n) option remember; if n < 4 then n+1 else a(iquo(n,2)) + a(iquo(n+1,2)) fi end:
    seq(a(n), n = 2..70); # Peter Bala, Aug 03 2022
  • Mathematica
    max = 70; f[x_] := -x/(1-x) + x/(1-x)^2*(2 + Sum[ x^(2^k + 2^(k+1)) - x^2^(k+1) , {k, 0, Ceiling[Log[2, max]]}]); Drop[ CoefficientList[ Series[f[x], {x, 0, max + 1}], x], 2](* Jean-François Alcover, May 16 2012, from g.f. *)
    a[2]=3; a[3]=4; a[n_?OddQ] := a[n] = a[(n-1)/2+1] + a[(n-1)/2]; a[n_?EvenQ] := a[n] = 2a[n/2]; Table[a[n], {n, 2, 71}] (* Jean-François Alcover, Jun 26 2012, after Vladeta Jovovic *)
  • PARI
    a(n) = my(s=logint(n,2)-1); if(bittest(n,s), n<<1 - 2<Kevin Ryde, Aug 08 2022
  • Python
    from functools import cache
    @cache
    def a(n): return n+1 if n < 4 else a(n//2) + a((n+1)//2)
    print([a(n) for n in range(2, 72)]) # Michael S. Branicky, Aug 04 2022
    

Formula

a(2^i + j) = 3*2^(i-1) + j, 0<=j<2^(i-1); a(3*2^(i-1) + j) = 2^(i+1) + 2*j, 0<=j<2^(i-1).
a(3*2^k + j) = 4*2^k + 3j/2 + |j|/2, k>=0, -2^k <= j < 2^k. - N. J. A. Sloane, Feb 23 2003
a(2*n+1) = a(n+1)+a(n), a(2*n) = 2*a(n). a(n) = n+A060973(n). - Vladeta Jovovic, Mar 01 2003
G.f.: -x/(1-x) + x/(1-x)^2 * (2 + sum(k>=0, t^2(t-1), t=x^2^k)). - Ralf Stephan, Sep 12 2003

Extensions

More terms from Matthew Vandermast and Vladeta Jovovic, Mar 01 2003

A081134 Distance to nearest power of 3.

Original entry on oeis.org

0, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7
Offset: 1

Views

Author

Klaus Brockhaus, Mar 08 2003

Keywords

Examples

			a(7) = 2 since 9 is closest power of 3 to 7 and 9 - 7 = 2.
		

Crossrefs

Programs

  • Maple
    a:= n-> (h-> min(n-h, 3*h-n))(3^ilog[3](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 28 2021
  • Mathematica
    Flatten[Table[Join[Range[0,3^n],Range[3^n-1,1,-1]],{n,0,4}]] (* Harvey P. Dale, Dec 31 2013 *)
  • PARI
    a(n) = my (p=#digits(n,3)); return (min(n-3^(p-1), 3^p-n)) \\ Rémy Sigrist, Mar 24 2018
    
  • Python
    def A081134(n):
        kmin, kmax = 0,1
        while 3**kmax <= n:
            kmax *= 2
        while True:
            kmid = (kmax+kmin)//2
            if 3**kmid > n:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return min(n-3**kmin, 3*3**kmin-n) # Chai Wah Wu, Mar 31 2021

Formula

a(n) = min(n-3^floor(log(n)/log(3)), 3*3^floor(log(n)/log(3))-n).
From Peter Bala, Sep 30 2022: (Start)
a(n) = n - A006166(n); a(n) = 2*n - A003605(n).
a(1) = 0, a(2) = 1, a(3) = 0; thereafter, a(3*n) = 3*a(n), a(3*n+1) = 2*a(n) + a(n+1) and a(3*n+2) = a(n) + 2*a(n+1). (End)

A080637 a(n) is the smallest positive integer which is consistent with the sequence being monotonically increasing and satisfying a(1)=2, a(a(n)) = 2n+1 for n > 1.

Original entry on oeis.org

2, 3, 5, 6, 7, 9, 11, 12, 13, 14, 15, 17, 19, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 37, 39, 41, 43, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 96, 97, 98, 99, 100, 101, 102
Offset: 1

Views

Author

N. J. A. Sloane and Benoit Cloitre, Feb 28 2003

Keywords

Comments

Sequence is the unique monotonic sequence satisfying a(a(n)) = 2n+1.
Except for the first term, numbers (greater than 2) whose binary representation starts with 11 or ends with 1. - Yifan Xie, May 26 2022

Examples

			From _Yifan Xie_, May 02 2022: (Start)
a(8) = 12 because 2*2^2 <= 8 < 3*2^2, hence a(8) = 8 + 2^2 = 12;
a(13) = 19 because 3*2^2 <= 13 < 4*2^2, hence a(13) = 2*(13 - 2^2) + 1 = 19. (End)
		

Crossrefs

Except for first term, same as A079905. Cf. A079000.
A007378, A079905, A080637, A080653 are all essentially the same sequence.
Equals A007378(n+1)-1. First differences give A079882.
Unique monotonic sequence of positive integers satisfying a(a(n)) = k*(n-1) + 3: this sequence (k=2), A003605 (k=3), A353651 (k=4), A353652 (k=5), A353653 (k=6).

Programs

  • Maple
    t := []; for k from 0 to 6 do for j from -2^k to 2^k-1 do t := [op(t), 4*2^k - 1 + 3*j/2 + abs(j)/2]; od: od: t;
  • Mathematica
    b[n_] := b[n] = If[n<4, n+1, If[OddQ[n], b[(n-1)/2+1]+b[(n-1)/2], 2b[n/2]]];
    a[n_] := b[n+1]-1;
    a /@ Range[70] (* Jean-François Alcover, Oct 31 2019 *)

Formula

a(3*2^k - 1 + j) = 4*2^k - 1 + 3*j/2 + |j|/2 for k >= 0, -2^k <= j < 2^k.
a(2n+1) = 2*a(n) + 1, a(2n) = a(n) + a(n-1) + 1.
From Yifan Xie, May 02 2022: (Start)
For n in the range 2*2^i <= n < 3*2^i, for i >= 0:
a(n) = n + 2^i.
a(n) = 1 + a(n-1).
Otherwise, for n in the range 3*2^i <= n < 4*2^i, for i >= 0:
a(n) = 2*(n - 2^i) + 1.
a(n) = 2 + a(n-1). (End)

A080720 a(0) = 5; for n>0, a(n) is taken to be the smallest positive integer greater than a(n-1) which is consistent with the condition "n is a member of the sequence if and only if a(n) is a multiple of 3".

Original entry on oeis.org

5, 7, 8, 10, 11, 12, 13, 15, 18, 19, 21, 24, 27, 30, 31, 33, 34, 35, 36, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 55, 57, 60, 63, 66, 67, 68, 69, 72, 73, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 103, 104, 105, 108, 109, 111, 112, 113, 114, 115, 116, 117, 118, 119
Offset: 0

Views

Author

N. J. A. Sloane, Mar 05 2003

Keywords

Crossrefs

Programs

  • PARI
    {a=5; m=[5]; for(n=1,66,print1(a,","); a=a+1; if(m[1]==n, while(a%3>0,a++); m=if(length(m)==1,[],vecextract(m,"2..")),if(a%3==0,a++)); m=concat(m,a))}

Formula

a(a(n)) = 3*(n+4).

Extensions

More terms and PARI code from Klaus Brockhaus, Mar 07 2003

A353651 Unique monotonic sequence of positive integers satisfying a(a(n)) = k*(n-1) + 3, where k = 4.

Original entry on oeis.org

2, 3, 7, 8, 9, 10, 11, 15, 19, 23, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, 99, 103, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125
Offset: 1

Views

Author

Yifan Xie, May 02 2022

Keywords

Comments

Numbers m such that the base-4 representation of (3*m-1) starts with 11 or 12 or 13 or ends with 0.
First differences give a run of 4^i 1's followed by a run of 4^i 4's, for i = 0, 1, 2, ...

Examples

			a(6) = 10 because (2*4^1 + 1)/3 < 6 <= (5*4^1 + 1)/3, hence a(6) = 6 + 4^1 = 10;
a(9) = 19 because (5*4^1 + 1)/3 < 9 <= (8*4^1 + 1)/3, hence a(9) = 4*(9 - 4^1) - 1 = 19.
		

Crossrefs

For other values of k: A080637 (k=2), A003605 (k=3), this sequence (k=4), A353652 (k=5), A353653 (k=6).

Programs

  • Maple
    isA353651 := proc(n)
        if modp(n,4) = 3 then
            true;
        else
            b4 := convert(3*n-1,base,4) ;
            if op(-1,b4) = 1 and op(-2,b4) <> 0  then
                true ;
            else
                false;
            end if;
        end if;
    end proc:
    for n from 2 to 122 do
        if isA353651(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Jul 05 2022
  • PARI
    a(n) = my(n3=3*n, s=logint(n3>>1, 4)<<1); if(n3>>s < 5, n + 1<Kevin Ryde, Apr 15 2022
    (C++)
    /* program used to generate the b-file */
    #include
    using namespace std;
    int main(){
        int cnt1=1, flag=0, cnt2=1, a=2;
        for(int n=1; n<=10000; n++) {
            cout<
    				

Formula

For n in the range (2*4^i + 1)/3 < n <= (5*4^i + 1)/3, for i >= 0:
a(n) = n + 4^i.
a(n) = 1 + a(n-1).
Otherwise, for n in the range (5*4^i + 1)/3 < n <= (8*4^i + 1)/3, for i >= 0:
a(n) = 4*(n - 4^i) - 1.
a(n) = 4 + a(n-1).

A353652 Unique monotonic sequence of positive integers satisfying a(a(n)) = k*(n-1) + 3, where k = 5.

Original entry on oeis.org

2, 3, 8, 9, 10, 11, 12, 13, 18, 23, 28, 33, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 68, 73, 78, 83, 88, 93, 98, 103, 108, 113, 118, 123, 128, 133, 138, 143, 148, 153, 158, 163, 168, 173, 178, 183, 188
Offset: 1

Views

Author

Yifan Xie, Jul 15 2022

Keywords

Comments

Numbers m such that the base-5 representation of (2*m-1) starts with 3 or 4 or ends with 0.
First differences give a run of 5^i 1's followed by a run of 5^i 5's, for i >= 0.

Examples

			a(7) = 12 because (5^1 + 1)/2 <= 7 < (3*5^1 + 1)/2, hence a(7) = 7 + 5^1 = 12;
a(11) = 28 because (3*5^1 + 1)/2 <= 11 < (5*5^1 + 1)/2, hence a(11) = 5*(11 - 5^1) - 2 = 28.
		

Crossrefs

For other values of k: A080637 (k=2), A003605 (k=3), A353651 (k=4), this sequence (k=5), A353653 (k=6).

Programs

  • Mathematica
    a[n_] := Module[{n2 = 2n, p}, p = 5^Floor@Log[5, n2]; If[n2 < 3p, n+p, 5(n-p)-2]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Sep 22 2023, after Kevin Ryde *)
  • PARI
    a(n) = my(n2=n<<1, p=5^logint(n2, 5)); if(n2 < 3*p, n+p, 5*(n-p)-2); \\ Kevin Ryde, Apr 18 2022
    (C++)
    /* program used to generate the b-file */
    #include
    using namespace std;
    int main(){
        int cnt1=1, flag=0, cnt2=1, a=2;
        for(int n=1; n<=10000; n++) {
            cout<
    				

Formula

For n in the range (5^i + 1)/2 <= n < (3*5^i + 1)/2, for i >= 0:
a(n) = n + 5^i.
a(n+1) = 1 + a(n).
Otherwise, for n in the range (3*5^i + 1)/2 < n <= (5*5^i + 1)/2, for i >= 0:
a(n) = 5*(n - 5^i) - 2.
a(n+1) = 5 + a(n).

A353653 Unique monotonic sequence of positive integers satisfying a(a(n)) = k*(n-1) + 3, where k = 6.

Original entry on oeis.org

2, 3, 9, 10, 11, 12, 13, 14, 15, 21, 27, 33, 39, 45, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 93, 99, 105, 111, 117, 123, 129, 135, 141, 147, 153, 159, 165
Offset: 1

Views

Author

Yifan Xie, Jul 15 2022

Keywords

Comments

Numbers m such that the base-6 representation of (5*m-3) starts with 11 or 12 or 13 or 14 or 15 or ends with 0.
First differences give a run of 6^i 1's followed by a run of 6^i 6's, for i >= 0.

Examples

			a(5) = 11 because (2*6^1 + 3)/3 <= 5 < (7*6^1 + 3)/5, hence a(5) = 5 + 6^1 = 11;
a(10) = 21 because (7*6^1 + 3)/5 <= 10 < (12*6^1 + 3)/5, hence a(10) = 6*(10 - 6^1) - 3 = 21.
		

Crossrefs

For other values of k: A080637 (k=2), A003605 (k=3), A353651 (k=4), A353652 (k=5), this sequence (k=6).

Programs

  • Mathematica
    okQ[m_] := With[{id = IntegerDigits[5 m - 3, 6] }, MatchQ[id[[1 ;; 2]], {1, 1}|{1, 2}|{1, 3}|{1, 4}|{1, 5}] || id[[-1]] == 0];
    Join[{2}, Select[Range[3, 1000], okQ]] (* Jean-François Alcover, Sep 22 2023 *)

Formula

For n in the range (2*6^i + 3)/5 <= n < (7*6^i + 3)/5, for i >= 0:
a(n) = n + 6^i.
a(n+1) = 1 + a(n).
Otherwise, for n in the range (7*6^i + 3)/5 <= n < (12*6^i + 3)/5, for i >= 0:
a(n) = 6*(n - 6^i) - 3.
a(n+1) = 6 + a(n).

A080710 a(0) = 1; for n>0, a(n) is taken to be the smallest positive integer greater than a(n-1) which is consistent with the condition "n is a member of the sequence if and only if a(n) is a multiple of 3".

Original entry on oeis.org

1, 3, 4, 6, 9, 10, 12, 13, 14, 15, 18, 19, 21, 24, 27, 30, 31, 32, 33, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 54, 57, 58, 59, 60, 63, 64, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 105, 108, 111, 112, 113, 114, 117, 118, 120
Offset: 0

Views

Author

N. J. A. Sloane, Mar 05 2003

Keywords

Comments

Is this the same sequence as A115837? - Andrew S. Plewe, May 08 2007

Crossrefs

Programs

  • PARI
    {a=1; m=[1]; for(n=1,67,print1(a,","); a=a+1; if(m[1]==n, while(a%3>0,a++); m=if(length(m)==1,[],vecextract(m,"2.."))); m=concat(m,a))}

Formula

a(a(n)) = 3*(n+1).

Extensions

More terms and PARI code from Klaus Brockhaus, Mar 06 2003

A006166 a(0)=0, a(1)=a(2)=1; for n >= 1, a(3n+2) = 2a(n+1) + a(n), a(3n+1) = a(n+1) + 2a(n), a(3n) = 3a(n).

Original entry on oeis.org

0, 1, 1, 3, 3, 3, 3, 5, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69
Offset: 0

Views

Author

Keywords

References

  • J. Arkin, D. C. Arney, L. S. Dewald and W. E. Ebel, Jr., Families of recursive sequences, J. Rec. Math., 22 (No. 22, 1990), 85-94.
  • vN. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) + n = A003605(n). Cf. A006165, A080678, A081134.

Formula

From Peter Bala, Oct 08 2022: (Start)
a(n+2) - a(n) = 0 or 2.
a(3^k + j) = 3^k for k >= 0 and for 0 <= j <= 3^k.
a(2*3^k + j) = 3^k + 2*j for k >= 0 and for 0 <= j <= 3^k.
A081134(n) = n - a(n). (End)

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 28 2003
Showing 1-10 of 15 results. Next