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.

Previous Showing 21-30 of 36 results. Next

A264987 Odd bisection of A263272.

Original entry on oeis.org

1, 3, 5, 11, 9, 7, 13, 15, 23, 29, 33, 17, 35, 27, 19, 37, 21, 25, 31, 39, 41, 95, 45, 59, 113, 69, 77, 83, 87, 47, 101, 99, 65, 119, 51, 71, 89, 105, 53, 107, 81, 55, 109, 57, 73, 91, 111, 43, 97, 63, 61, 115, 75, 79, 85, 93, 49, 103, 117, 67, 121, 123, 203, 257, 285, 149, 311, 135, 167, 329, 177, 221, 275
Offset: 0

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Crossrefs

Programs

  • Python
    from sympy import factorint
    from sympy.ntheory.factor_ import digits
    from operator import mul
    def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
    def a038502(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
    def a038500(n): return n/a038502(n)
    def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
    def a(n): return a263273(2*(2*n + 1))/2 # Indranil Ghosh, May 23 2017
  • Scheme
    (define (A264987 n) (A263272 (+ 1 n n)))
    

Formula

a(n) = A263272((2*n)+1).

A266407 Permutation of natural numbers: a(n) = A064989(A263273((2*n)-1)).

Original entry on oeis.org

1, 2, 5, 3, 4, 17, 11, 10, 9, 7, 6, 19, 13, 8, 21, 31, 34, 71, 29, 22, 61, 25, 20, 59, 41, 18, 73, 23, 14, 33, 43, 12, 53, 37, 38, 35, 15, 26, 67, 47, 16, 157, 107, 42, 145, 55, 62, 197, 69, 68, 179, 113, 142, 129, 39, 58, 191, 137, 44, 45, 49, 122, 227, 101, 50, 199, 151, 40, 121, 57, 118, 211, 89, 82, 111, 149, 36, 91, 85
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Inverse: A266408.
Cf. also A064216, A266401, A266403.

Programs

  • PARI
    A030102(n) = { my(r=[n%3]); while(0M. F. Hasler's Nov 04 2011 code in A030102.
    A263273 = n -> if(!n,n,A030102(n/(3^valuation(n,3))) * (3^valuation(n, 3))); \\ Taking of the quotient probably unnecessary.
    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)};
    A266407 = n -> A064989(A263273((2*n)-1));
    for(n=1, 9842, write("b266407.txt", n, " ", A266407(n)));
    
  • Scheme
    (define (A266407 n) (A064989 (A263273 (+ n n -1))))

Formula

a(n) = A064989(A263273((2*n)-1)).

A266408 Permutation of natural numbers: a(n) = (1/2) * (1+A263273(A003961(n))).

Original entry on oeis.org

1, 2, 4, 5, 3, 11, 10, 14, 9, 8, 7, 32, 13, 29, 37, 41, 6, 26, 12, 23, 15, 20, 28, 95, 22, 38, 115, 86, 19, 110, 16, 122, 30, 17, 36, 77, 34, 35, 55, 68, 25, 44, 31, 59, 60, 83, 40, 284, 61, 65, 100, 113, 33, 344, 46, 257, 70, 56, 24, 329, 21, 47, 289, 365, 88, 89, 39, 50, 49, 107, 18, 230, 27, 101, 244, 104, 112, 164, 82, 203, 174, 74
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Inverse: A266407.
Cf. also A048673, A266401, A266403.

Programs

  • PARI
    A030102(n) = { my(r=[n%3]); while(0M. F. Hasler's Nov 04 2011 code in A030102.
    A263273 = n -> if(!n,n,A030102(n/(3^valuation(n,3))) * (3^valuation(n, 3))); \\ Taking of the quotient probably unnecessary.
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
    A266408 = n -> (1+A263273(A003961(n)))/2;
    for(n=1, 8191, write("b266408.txt", n, " ", A266408(n)));
    
  • Scheme
    (define (A266408 n) (/ (+ 1 (A263273 (A003961 n))) 2))

Formula

a(n) = (1/2) * (1+A263273(A003961(n))).

A361818 For any number k >= 0, let T_k be the triangle whose base corresponds to the ternary expansion of k (without leading zeros) and other values, say t above u and v, satisfy t = (-u-v) mod 3; this sequence lists the numbers k such that T_k has 3-fold rotational symmetry.

Original entry on oeis.org

0, 1, 2, 4, 8, 13, 26, 34, 40, 46, 59, 65, 80, 112, 121, 130, 224, 233, 242, 304, 364, 424, 518, 578, 728, 772, 862, 925, 1003, 1093, 1183, 1261, 1324, 1414, 1535, 1598, 1688, 1766, 1856, 1919, 2006, 2096, 2186, 2257, 2509, 2734, 3028, 3280, 3532, 3826, 4051
Offset: 1

Views

Author

Rémy Sigrist, Mar 25 2023

Keywords

Comments

We can devise a similar sequence for any fixed base b >= 2; the present sequence corresponds to b = 3, and A334556 corresponds to b = 2.
This sequence is infinite as it contains A048328.
If k belongs to the sequence, then A004488(k) and A030102(k) belong to the sequence.
Empirically, there are 2*3^floor((w-1)/3) positive terms with w ternary digits.
For any k, if t appears above u and v in T_k, then t + u + v = 0 (mod 3) and #{t, u, v} = 1 or 3 (the three values are either equal or all distinct); each value is uniquely determined by the two others in the same way: t = (-u-v) mod 3, u = (-t-v) mod 3, v = (-t-u) mod 3; this means that we can reconstruct T_k from any of its three sides.
If some row of T_k, say r, has w values and corresponds to the ternary expansion of m, then the row above r corresponds to the w-1 rightmost digits of the ternary expansion of A060587(m).
All positive terms belong to A297250 (their most significant digit equals their least significant digit in base 3).

Examples

			The ternary expansion of 304 is "102021", and the corresponding triangle is:
             1
            0 2
           2 1 0
          0 1 1 2
         2 1 1 1 0
        1 0 2 0 2 1
As this triangle has 3-fold rotational symmetry, 304 belongs to the sequence.
		

Crossrefs

Programs

  • PARI
    See Links section.

A055946 n + reversal of base 3 digits of n (written in base 10).

Original entry on oeis.org

0, 2, 4, 4, 8, 12, 8, 12, 16, 10, 20, 30, 16, 26, 36, 22, 32, 42, 20, 30, 40, 26, 36, 46, 32, 42, 52, 28, 56, 84, 40, 68, 96, 52, 80, 108, 40, 68, 96, 52, 80, 108, 64, 92, 120, 52, 80, 108, 64, 92, 120, 76, 104, 132, 56, 84, 112, 68, 96, 124, 80, 108, 136, 68, 96, 124, 80
Offset: 0

Views

Author

Henry Bottomley, Jul 18 2000

Keywords

Comments

If n has an even number of digits in base 3 then a(n) is a multiple of 4.

Crossrefs

Programs

Formula

a(n) = n + A030102(n).

A266189 Self-inverse permutation of nonnegative integers: a(n) = A263273(A264985(A263273(n))).

Original entry on oeis.org

0, 1, 3, 2, 4, 10, 6, 9, 12, 7, 5, 11, 8, 13, 37, 24, 28, 31, 21, 19, 57, 18, 27, 30, 15, 36, 39, 22, 16, 34, 23, 17, 35, 69, 29, 32, 25, 14, 38, 26, 40, 118, 78, 109, 112, 75, 46, 100, 72, 82, 91, 51, 85, 94, 66, 64, 192, 20, 73, 219, 60, 171, 138, 63, 55, 165, 54, 81, 84, 33, 90, 111, 48, 58, 174, 45, 108, 93, 42, 117, 120, 67, 49
Offset: 0

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{g, h}, g[x_] := x/3^IntegerExponent[x, 3]; h[x_] := x/g@ x; If[n == 0, 0, FromDigits[Reverse@ IntegerDigits[#, 3], 3] &@ g[n] h[n]]]; s = Select[f /@ Range@ 5000, OddQ]; t = Table[(s[[n + 1]] - 1)/2, {n, 0, 1000}]; Table[f@ t[[f@ n + 1]], {n, 0, 82}] (* Michael De Vlieger, Jan 04 2016, after Jean-François Alcover at A263273 *)
  • Python
    from sympy import factorint
    from sympy.ntheory.factor_ import digits
    from operator import mul
    def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
    def a038502(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
    def a038500(n): return n/a038502(n)
    def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
    def a264985(n): return (a263273(2*n + 1) - 1)/2
    def a(n): return a263273(a264985(a263273(n))) # Indranil Ghosh, May 22 2017
  • Scheme
    (define (A266189 n) (A263273 (A264985 (A263273 n))))
    

Formula

a(n) = A263273(A264985(A263273(n))).
As a composition of related permutations:
a(n) = A263273(A265353(n)).
a(n) = A265354(A263273(n)).

A331173 a(n) = min(n, A263273(n)), where A263273 is bijective base-3 reverse.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 11, 20, 15, 14, 23, 24, 17, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 31, 38, 39, 40, 41, 42, 43, 44, 45, 34, 47, 48, 43, 50, 51, 52, 53, 54, 29, 56, 33, 38, 59, 60, 47, 62, 45, 32, 59, 42, 41, 68, 69, 50, 71, 72, 35, 62, 51, 44, 71, 78, 53, 80, 81
Offset: 0

Views

Author

Antti Karttunen, Jan 12 2020

Keywords

Comments

For all i, j:
a(i) = a(j) => A290094(i) = A290094(j).
For all i, j > 0:
a(i) = a(j) => A007949(i) = A007949(j).

Crossrefs

Programs

A346113 Base-10 numbers k whose number of divisors equals the number of divisors in R(k), where k is written in all bases from base-2 to base-10 and R(k), the digit reversal of k, is read as a number in the same base.

Original entry on oeis.org

1, 9077, 10523, 10838, 30182, 58529, 73273, 77879, 83893, 244022, 303253, 303449, 304853, 329893, 332249, 334001, 334417, 335939, 336083, 346741, 374617, 391187, 504199, 512695, 516982, 595274, 680354, 687142, 758077, 780391, 792214, 854669, 946217, 948539, 995761, 1008487, 1377067, 1389341
Offset: 1

Views

Author

Scott R. Shannon, Jul 05 2021

Keywords

Comments

There are 633 terms below 50 million and 1253 terms below 100 million. All of those have tau(k), the number of divisors of k, equal to 1, 2, 4, 8 or 16. The first term where tau(k) = 2 is n = 93836531, a prime, which is also the first term of A136634. All terms in A136634 will appear in this sequence, as will all terms in A228768(n) for n>=10. The first term with tau(k) = 4 is 9077, the first with tau(k) = 8 is 595274, and the first with tau(k) = 16 is 5170182. It is possible tau(k) must equal 2^i, with i>=0, although this is unknown.
All known terms are squarefree. - Michel Marcus, Jul 07 2021

Examples

			9077 is a term as the number of divisors of 9077 = tau(9077) = 4, and this equals the number of divisors of R(9077) when written and then read as a base-j number, with 2 <= j <= 10. See the table below for k = 9077.
.
  base | k_base         | R(k_base)      | R(k_base)_10  | tau(R(k_base)_10)
----------------------------------------------------------------------------------
   2   | 10001101110101 | 10101110110001 | 11185         | 4
   3   | 110110012      | 210011011      | 15421         | 4
   4   | 2031311        | 1131302        | 6002          | 4
   5   | 242302         | 203242         | 6697          | 4
   6   | 110005         | 500011         | 38887         | 4
   7   | 35315          | 51353          | 12533         | 4
   8   | 21565          | 56512          | 23882         | 4
   9   | 13405          | 50431          | 33157         | 4
  10   | 9077           | 7709           | 7709          | 4
		

Crossrefs

Cf. A136634 (prime terms), A228768.
Subsequence of A062895.

Programs

  • Mathematica
    Select[Range@100000,Length@Union@DivisorSigma[0,Join[{s=#},FromDigits[Reverse@IntegerDigits[s,#],#]&/@Range[2,10]]]==1&] (* Giorgos Kalogeropoulos, Jul 06 2021 *)
  • PARI
    isok(k) = {my(t= numdiv(k)); for (b=2, 10, my(d=digits(k, b)); if (numdiv(fromdigits(Vecrev(d), b)) != t, return (0));); return(1);} \\ Michel Marcus, Jul 06 2021

A365803 Dirichlet inverse of bijective base-3 reverse of n (A263273).

Original entry on oeis.org

1, -2, -3, 0, -7, 6, -5, 0, 0, 18, -19, 0, -13, -2, 21, 0, -25, 0, -11, -8, 15, 62, -23, 0, 32, 26, 0, 40, -55, -54, -37, -32, 57, 54, -3, 0, -31, -14, 39, 0, -67, 6, -49, -96, 0, 58, -61, 0, -18, -156, 75, 0, -79, 0, 237, -32, 33, 182, -65, 24, -47, 74, 0, 160, 123, -186, -41, 16, 69, 230, -77, 0, -35, 62, -96, 144
Offset: 1

Views

Author

Antti Karttunen, Sep 19 2023

Keywords

Crossrefs

Cf. A263273, A323239 (parity of terms), A365804.
Cf. also A365711.

Programs

  • PARI
    A030102(n) = { my(r=[n%3]); while(0A263273 = n -> if(!n,n,A030102(n/(3^valuation(n,3))) * (3^valuation(n, 3)));
    memoA365803 = Map();
    A365803(n) = if(1==n,1,my(v); if(mapisdefined(memoA365803,n,&v), v, v = -sumdiv(n,d,if(dA263273(n/d)*A365803(d),0)); mapput(memoA365803,n,v); (v)));

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA263273(n/d) * a(d).

A365804 Sum of bijective base-3 reverse of n (A263273) and its Dirichlet inverse.

Original entry on oeis.org

2, 0, 0, 4, 0, 12, 0, 8, 9, 28, 0, 12, 0, 20, 42, 16, 0, 18, 0, 12, 30, 76, 0, 24, 49, 52, 27, 68, 0, -24, 0, 32, 114, 100, 70, 36, 0, 44, 78, 40, 0, 72, 0, -20, 63, 92, 0, 48, 25, -86, 150, 52, 0, 54, 266, 24, 66, 220, 0, 84, 0, 148, 45, 192, 182, -144, 0, 84, 138, 280, 0, 72, 0, 124, -45, 188, 190, 0, 0, 80, 81
Offset: 1

Views

Author

Antti Karttunen, Sep 19 2023

Keywords

Crossrefs

Cf. also A365712.

Programs

Formula

a(n) = A263273(n) + A365803(n).
a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1A263273(d) * A365803(n/d).
Previous Showing 21-30 of 36 results. Next