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 22 results. Next

A291760 Binary encoding of 2-digits in ternary representation of A254103(n).

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 3, 2, 1, 0, 1, 2, 5, 0, 3, 0, 1, 4, 7, 2, 1, 4, 5, 0, 9, 0, 1, 4, 5, 0, 1, 2, 1, 8, 9, 2, 13, 0, 3, 6, 1, 4, 7, 0, 9, 0, 3, 4, 17, 4, 7, 8, 1, 8, 11, 2, 9, 12, 15, 2, 1, 4, 5, 6, 1, 20, 23, 2, 17, 4, 5, 6, 25, 0, 1, 10, 5, 8, 11, 0, 1, 8, 9, 12, 13, 0, 1, 2, 17, 0, 1, 4, 5, 8, 9, 0, 33, 8, 9, 12, 13, 16, 17, 0, 1, 16, 17, 2, 21, 0, 3, 6, 17
Offset: 0

Views

Author

Antti Karttunen, Sep 12 2017

Keywords

Crossrefs

Formula

a(n) = A289814(A254103(n)).

A304740 Restricted growth sequence transform of A304760(n), formed from 1-digits in ternary representation of A254103(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 29 2018

Keywords

Crossrefs

Cf. also A304746.

Programs

  • PARI
    A254103(n) = if(!n,n,if(!(n%2),(3*A254103(n/2))-1,(3*(1+A254103((n-1)/2)))\2));
    A289813(n) = { my (d=digits(n, 3)); from digits(vector(#d, i, if (d[i]==1, 1, 0)), 2); } \\ From A289813
    A304760(n) = A289813(A254103(n));
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    v304740 = rgs_transform(vector(65538,n,A304760(n-1)));
    A304740(n) = v304740[1+n];

A304746 Restricted growth sequence transform of A291760(n), formed from 2-digits in ternary representation of A254103(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 29 2018

Keywords

Crossrefs

Programs

  • PARI
    A254103(n) = if(!n,n,if(!(n%2),(3*A254103(n/2))-1,(3*(1+A254103((n-1)/2)))\2));
    A289814(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==2, 1, 0)), 2); } \\ From A289814
    A291760(n) = A289814(A254103(n));
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    v304746 = rgs_transform(vector(65537,n,A291760(n-1)));
    A304746(n) = v304746[1+n];

A292241 The 3-adic valuation of A254103(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 4, 0, 0, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, Sep 12 2017

Keywords

Crossrefs

One less than the even bisection of A292242.
Cf. also A292251, A292261.

Formula

a(n) = A007814(1+A292240(n)).
a(n) = A007949(A254103(n)).
For n >= 1, a(n) = A007949(3*A254103(n)) - 1.
For n >= 1, a(n) = A292242(2n)-1.

A304760 Binary encoding of 1-digits in ternary representation of A254103(n).

Original entry on oeis.org

0, 1, 0, 2, 2, 3, 0, 0, 6, 4, 4, 1, 2, 7, 4, 5, 14, 3, 0, 4, 10, 0, 0, 6, 6, 12, 12, 2, 10, 8, 8, 5, 30, 4, 4, 9, 2, 15, 12, 0, 22, 11, 8, 9, 2, 11, 8, 1, 14, 19, 16, 1, 26, 3, 0, 8, 22, 3, 0, 12, 18, 8, 8, 1, 62, 3, 0, 20, 10, 16, 16, 9, 6, 28, 28, 1, 26, 7, 4, 13, 46, 20, 20, 2, 18, 16, 16, 13, 6, 20, 20, 10, 18
Offset: 0

Views

Author

Antti Karttunen, May 29 2018

Keywords

Crossrefs

Cf. A254103, A289813, A304740 (rgs-transform).
Cf. also A291760.

Programs

Formula

a(n) = A289813(A254103(n)).

A254116 Permutation of natural numbers: a(n) = A064216(A254103(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 13, 10, 11, 12, 9, 14, 17, 16, 41, 26, 23, 20, 15, 22, 19, 24, 67, 18, 37, 28, 47, 34, 29, 32, 27, 82, 61, 52, 73, 46, 43, 40, 89, 30, 21, 44, 59, 38, 31, 48, 111, 134, 107, 36, 57, 74, 33, 56, 149, 94, 79, 68, 83, 58, 25, 64, 359, 54, 181, 164, 193, 122, 101, 104, 229, 146, 49, 92, 85, 86, 71, 80, 185, 178, 139, 60, 95, 42, 39
Offset: 1

Views

Author

Antti Karttunen, Feb 04 2015

Keywords

Crossrefs

Inverse: A254115.
Fixed points: A254099.
Related permutations: A064216, A254103, A254118.

Programs

  • PARI
    default(primelimit, 2^30);
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A064216(n) = A064989((2*n)-1);
    A254103(n) = { if(0==n,0,if(!(n%2),(3*A254103(n/2))-1,(3*(1+A254103((n-1)/2)))\2)); };
    A254116(n) = A064216(A254103(n));
    for(n=1, 8192, write("b254116.txt", n, " ", A254116(n)));
    
  • Python
    from sympy import factorint, prevprime, floor
    from operator import mul
    def a064216(n):
        f=factorint(2*n - 1)
        return 1 if n==1 else reduce(mul, [prevprime(i)**f[i] for i in f])
    def a254103(n):
        if n==0: return 0
        if n%2==0: return 3*a254103(n/2) - 1
        else: return floor((3*(1 + a254103((n - 1)/2)))/2)
    def a(n): return a064216(a254103(n)) # Indranil Ghosh, Jun 06 2017
  • Scheme
    (define (A254116 n) (A064216 (A254103 n)))
    

Formula

a(n) = A064216(A254103(n)).
Other identities. For all n >= 1:
a(n) = a(2n)/2. [Even bisection halved gives back the sequence itself.]
A254118(n) = (a((2*n)+1) - 1)/2. [Likewise, the odd bisection induces A254118.]

A286632 Base-3 digit sum of A254103: a(n) = A053735(A254103(n)).

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 4, 2, 4, 1, 3, 3, 5, 3, 5, 2, 5, 4, 6, 3, 4, 2, 4, 2, 6, 2, 4, 3, 6, 1, 3, 4, 6, 3, 5, 4, 7, 4, 6, 4, 5, 5, 7, 2, 5, 3, 5, 3, 7, 5, 7, 3, 5, 4, 6, 3, 7, 6, 8, 4, 4, 3, 5, 5, 7, 6, 8, 4, 6, 3, 5, 6, 8, 3, 5, 5, 7, 5, 7, 3, 6, 4, 6, 5, 8, 1, 3, 5, 6, 2, 4, 4, 6, 2, 4, 2, 8, 4, 6, 6, 8, 2, 4, 2, 6, 3, 5, 4, 7, 4, 6, 5, 8, 5, 7, 5, 9, 5, 7, 4, 5
Offset: 0

Views

Author

Antti Karttunen, Jun 03 2017

Keywords

Comments

Reflecting the structure of A254103 also this sequence can be represented as a binary tree:
0
|
...................1...................
2 1
3......../ \........2 4......../ \........2
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
4 1 3 3 5 3 5 2
5 4 6 3 4 2 4 2 6 2 4 3 6 1 3 4
etc.

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    def a254103(n):
        if n==0: return 0
        if n%2==0: return 3*a254103(n/2) - 1
        else: return floor((3*(1 + a254103((n - 1)/2)))/2)
    def a(n): return sum(digits(a254103(n), 3)[1:]) # Indranil Ghosh, Jun 06 2017
  • Scheme
    (define (A286632 n) (A053735 (A254103 n)))
    

Formula

a(n) = A053735(A254103(n)).
a(n) = A056239(A286633(n)).
For all n >= 0, a(A000079(n)) = n+1.

A286633 Base-3 {digit+1} product of A254103: a(n) = A006047(A254103(n)).

Original entry on oeis.org

1, 2, 3, 2, 6, 4, 9, 3, 12, 2, 6, 6, 18, 8, 18, 4, 24, 12, 27, 6, 12, 3, 9, 4, 36, 4, 12, 6, 36, 2, 6, 12, 48, 6, 18, 12, 54, 16, 36, 9, 24, 24, 54, 4, 18, 8, 18, 6, 72, 24, 54, 6, 24, 12, 27, 6, 72, 36, 81, 12, 12, 6, 18, 18, 96, 36, 81, 12, 36, 6, 18, 36, 108, 8, 24, 18, 72, 24, 54, 8, 48, 12, 36, 18, 108, 2, 6, 24, 36, 4, 12, 12, 36, 3, 9, 4
Offset: 0

Views

Author

Antti Karttunen, Jun 03 2017

Keywords

Comments

Reflecting the structure of A254103 also this sequence can be represented as a binary tree:
1
|
...................2...................
3 2
6......../ \........4 9......../ \........3
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
12 2 6 6 18 8 18 4
24 12 27 6 12 3 9 4 36 4 12 6 36 2 6 12
etc.

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    from operator import mul
    from functools import reduce
    def a006047(n):
        d=digits(n, 3)
        return reduce(mul, [1 + d[i] for i in range(1, len(d))])
    def a254103(n):
        if n==0: return 0
        if n%2==0: return 3*a254103(n//2) - 1
        else: return (3*(1 + a254103((n - 1)//2)))//2
    def a(n): return a006047(a254103(n)) # Indranil Ghosh, Jun 06 2017
  • Scheme
    (define (A286633 n) (A006047 (A254103 n)))
    

Formula

a(n) = A006047(A254103(n)).
For n >= 0, a(A000079(n)) = A042950(n).

A292240 Binary encoding of 0-digits in ternary representation of A254103(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 2, 0, 0, 0, 0, 2, 0, 0, 0, 1, 4, 3, 2, 1, 0, 3, 2, 1, 0, 7, 6, 0, 0, 3, 2, 4, 0, 0, 0, 1, 8, 0, 0, 6, 4, 4, 4, 2, 0, 8, 8, 6, 4, 4, 4, 5, 0, 0, 0, 1, 12, 3, 2, 0, 0, 8, 8, 9, 4, 11, 10, 0, 0, 3, 2, 4, 0, 0, 0, 2, 16, 3, 2, 1, 0, 15, 14, 0, 8, 11, 10, 1, 8, 7, 6, 5, 0, 19, 18, 1, 16, 15, 14, 13, 8, 11
Offset: 0

Views

Author

Antti Karttunen, Sep 12 2017

Keywords

Crossrefs

Formula

a(n) = A291770(A254103(n)).

A292242 Number of trailing 2-digits in ternary representation of A254103(n).

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1
Offset: 0

Views

Author

Antti Karttunen, Sep 12 2017

Keywords

Crossrefs

Cf. A007814, A007949, A254103, A291760, A292241 (even bisection subtracted by one).
Cf. also A292252, A292262.

Programs

Formula

a(n) = A007949(1+A254103(n)).
a(n) = A007814(1+A291760(n)).
a(0) = 0, after which, a(2n) = 1 + A292241(n/2), a(2n+1) = 0.
Showing 1-10 of 22 results. Next