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 41-45 of 45 results.

A289869 Square array T(n,k) (n>=0, k>=0) read by antidiagonals downwards: T(n,k) = A005836(n) + 2*A005836(k).

Original entry on oeis.org

0, 2, 1, 6, 3, 3, 8, 7, 5, 4, 18, 9, 9, 6, 9, 20, 19, 11, 10, 11, 10, 24, 21, 21, 12, 15, 12, 12, 26, 25, 23, 22, 17, 16, 14, 13, 54, 27, 27, 24, 27, 18, 18, 15, 27, 56, 55, 29, 28, 29, 28, 20, 19, 29, 28, 60, 57, 57, 30, 33, 30, 30, 21, 33, 30, 30, 62, 61, 59
Offset: 1

Views

Author

Rémy Sigrist, Jul 14 2017

Keywords

Comments

If n and k have no common one bit in base 2 representation (n AND k = 0), then n = A289813(T(n,k)) and k = A289814(T(n,k)).
This sequence, when restricted to the pairs of numbers without common bits in base 2 representation, is the inverse of the function n -> (A289813(n), A289814(n)).

Examples

			The table begins:
x\y:    0   1   2   3   4   5   6   7   8   9  ...
0:      0   2   6   8   18  20  24  26  54  56 ...
1:      1   3   7   9   19  21  25  27  55  57 ...
2:      3   5   9   11  21  23  27  29  57  59 ...
3:      4   6   10  12  22  24  28  30  58  60 ...
4:      9   11  15  17  27  29  33  35  63  65 ...
5:      10  12  16  18  28  30  34  36  64  66 ...
6:      12  14  18  20  30  32  36  38  66  68 ...
7:      13  15  19  21  31  33  37  39  67  69 ...
8:      27  29  33  35  45  47  51  53  81  83 ...
9:      28  30  34  36  46  48  52  54  82  84 ...
...
		

Crossrefs

Programs

  • PARI
    T(n,k) = fromdigits(binary(n),3) + 2*fromdigits(binary(k),3)
    
  • Python
    def T(n, k): return int(bin(n)[2:], 3) + 2*int(bin(k)[2:], 3)
    for n in range(11): print([T(k, n - k) for k in range(n + 1)]) # Indranil Ghosh, Aug 03 2017

A340684 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = [A291759(n), A278222(A304759(n))], for all i, j >= 1.

Original entry on oeis.org

1, 2, 1, 3, 4, 5, 6, 7, 8, 3, 9, 10, 1, 11, 12, 13, 14, 7, 4, 15, 14, 16, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25, 9, 3, 8, 26, 24, 11, 27, 26, 28, 3, 29, 30, 22, 31, 1, 32, 33, 34, 35, 36, 14, 37, 35, 38, 39, 10, 40, 41, 22, 42, 43, 44, 45, 46, 4, 15, 47, 31, 40, 48, 49, 50, 51, 21, 52, 53, 54, 55, 56, 30, 24, 15
Offset: 1

Views

Author

Antti Karttunen, Jan 16 2021

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A291759(n), A278222(A304759(n))].
For all i, j: a(i) = a(j) => A340383(i) = A340383(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A048673(n) = (A003961(n)+1)/2;
    A289814(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==2, 1, 0)), 2); } \\ From A289814
    A291759(n) = A289814(A048673(n));
    A289813(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==1, 1, 0)), 2); } \\ From A289813
    A304759(n) = A289813(A048673(n));
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A278222(n) = A046523(A005940(1+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; };
    Aux340684(n) = [A291759(n),A278222(A304759(n))];
    v340684 = rgs_transform(vector(up_to,n,Aux340684(n)));
    A340684(n) = v340684[n];

A366793 Binary encoding of the ones in the balanced ternary representation of Per Nørgård's "infinity sequence".

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 24 2023

Keywords

Comments

The composer Per Nørgård's name is also written in the OEIS as Per Noergaard.

Examples

			A004718(254) = -7. In balanced ternary representation (see A117966) this is represented as -1*9 + 1*3 + -1*1. Taking the positive coefficients, and converting them to a binary string gives "10", which in base-2 (A007088) is equal to 2, therefore a(254) = 2.
		

Crossrefs

Programs

Formula

a(n) = A289813(A323909(n)).

A293450 Restricted growth sequence transform of (3*A293225(n) + A010872(n)), a filter combining (n mod 3) with two products, the other formed from the 1-digits (A293221) and the other from the 2-digits (A293222) present in the ternary expansions of proper divisors of n.

Original entry on oeis.org

1, 2, 3, 4, 2, 5, 6, 7, 8, 9, 2, 10, 6, 11, 12, 13, 2, 14, 6, 15, 16, 17, 2, 18, 19, 20, 21, 22, 2, 23, 6, 24, 25, 26, 27, 28, 6, 29, 30, 31, 2, 32, 6, 33, 34, 35, 2, 36, 37, 38, 14, 39, 2, 40, 41, 42, 43, 44, 2, 45, 6, 46, 47, 48, 49, 50, 6, 51, 52, 53, 2, 54, 6, 55, 56, 57, 58, 59, 6, 60, 61, 62, 2, 63, 64, 65, 66, 67, 2
Offset: 1

Views

Author

Antti Karttunen, Nov 06 2017

Keywords

Crossrefs

Programs

  • PARI
    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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ This function from M. F. Hasler
    A289813(n) = { my (d=digits(n, 3)); from digits(vector(#d, i, if (d[i]==1, 1, 0)), 2); };
    A289814(n) = { my (d=digits(n, 3)); from digits(vector(#d, i, if (d[i]==2, 1, 0)), 2); };
    A293221(n) = { my(m=1); fordiv(n,d,if(d < n,m *= A019565(A289813(d)))); m; };
    A293222(n) = { my(m=1); fordiv(n,d,if(d < n,m *= A019565(A289814(d)))); m; };
    Anot_submitted(n) = (1/2)*(2 + ((A293222(n) + A293221(n))^2) - A293222(n) - 3*A293221(n)); \\ Eq.class-wise equal to A293225.
    Anot2submitted(n) = ((3*Anot_submitted(n))+(n%3));
    write_to_bfile(1,rgs_transform(vector(59049,n,Anot2submitted(n))),"b293450.txt");

Formula

For all i, j: a(i) = a(j) => A002324(i) = A002324(j).

A356248 Image of 1 under repeated application of the map k -> (2k-1,2k,2k-1).

Original entry on oeis.org

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

Views

Author

Arie Bos, Jul 31 2022

Keywords

Examples

			1 --> 1 2 1 --> 1 2 1 3 4 3 1 2 1 --> 1 2 1 3 4 3 1 2 1 5 6 5 7 8 7 5 6 5 1 2 1 3 4 3 1 2 1 -->...
		

Crossrefs

Cf. A289813.

Programs

  • PARI
    a(n) = fromdigits(digits(n,3)%2,2) + 1; \\ Kevin Ryde, Jul 31 2022
  • Python
    def aupton(terms):
        a, n = [1], 0
        while len(a) < 3*terms: a, n = a + [(1<Michael S. Branicky, Jul 31 2022
    

Formula

If A(n) = (a(0),a(1),...,a(3^n-1)), then A(n+1) = (A(n),2^n+A(n),A(n)).
a(n) = A289813(n) + 1. - Rémy Sigrist, Jul 31 2022
Previous Showing 41-45 of 45 results.