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

A065627 Permutation of N induced by rotating the node 2 right in the infinite planar binary tree. The second row of A065625. Inverse of A065628.

Original entry on oeis.org

1, 5, 3, 2, 11, 6, 7, 4, 10, 22, 23, 12, 13, 14, 15, 8, 9, 20, 21, 44, 45, 46, 47, 24, 25, 26, 27, 28, 29, 30, 31, 16, 17, 18, 19, 40, 41, 42, 43, 88, 89, 90, 91, 92, 93, 94, 95, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 32, 33, 34, 35, 36, 37, 38, 39, 80, 81, 82, 83, 84, 85, 86, 87, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186
Offset: 1

Views

Author

Antti Karttunen, Nov 08 2001

Keywords

Crossrefs

A065627[n] = A057114[A065631[A057115[n]]]. Stabilizes the set A004760.

Programs

  • Maple
    [seq(RotateNodeRight(2,j),j=1..120)];

A159629 Slowest increasing sequence beginning with a(1)=4 such that A002828(a(n)) = A002828(n).

Original entry on oeis.org

4, 5, 6, 9, 10, 11, 15, 17, 25, 26, 27, 30, 32, 33, 39, 49, 50, 52, 54, 58, 59, 62, 63, 66, 81, 82, 83, 87, 89, 91, 92, 97, 99, 101, 102, 121, 122, 123, 124, 125, 128, 129, 131, 132, 136, 138, 143, 147, 169, 170, 171, 173, 178, 179, 183, 184, 186, 193, 195, 199, 200, 201, 207
Offset: 1

Views

Author

Vladimir Shevelev, Apr 17 2009, May 04 2009

Keywords

Comments

Conjecture: For every m>2 there exists a minimum index N(m) such that the minimal increasing recursive sequence S_m(n) beginning with m^2 with the condition A002828(S_m(n)) = A002828(n) coincides with a(n) for all n>N.

Crossrefs

Programs

  • Mathematica
    a2828[n_] := Which[SquaresR[1, n]>0, 1, SquaresR[2, n]>0, 2, SquaresR[3, n] > 0, 3, True, 4];
    a[1] = 4; a[n_] := a[n] = For[k = a[n-1]+1, True, k++, If[a2828[k] == a2828[n], Return[k]]];
    Array[a, 63] (* Jean-François Alcover, Jul 28 2018 *)

Formula

a(n+1) = min { l > a(n) : A002828(l) = A002828(n+1) }.

Extensions

137 replaced by 136, extended by R. J. Mathar, Sep 17 2009

A160217 Minimal increasing sequence with a(1)=3 and the property that a(n) and n are both in or both not in A003159.

Original entry on oeis.org

3, 6, 7, 9, 11, 14, 15, 18, 19, 22, 23, 25, 27, 30, 31, 33, 35, 38, 39, 41, 43, 46, 47, 50, 51, 54, 55, 57, 59, 62, 63, 66, 67, 70, 71, 73, 75, 78, 79, 82, 83, 86, 87, 89, 91, 94, 95, 97, 99, 102, 103, 105, 107, 110, 111, 114, 115, 118, 119, 121, 123, 126, 127, 129, 131, 134
Offset: 1

Views

Author

Vladimir Shevelev, May 04 2009

Keywords

Comments

The primes in this sequence give A160216.
Conjecture: Let m>3 belong to A003159. Define the sequence b(n) to be the minimal increasing sequence with b(1)=m and the property that b(n) and n are both in or both not in A003159. Then a(n)=b(n) for all n larger than some m-dependent minimum index.

Examples

			n=2 is not in A003159. So a(2) is the smallest number larger than a(1)=3 which is not in A003159. This excludes 4 and 5 which are in A003159 and leads to a(2)=6.
		

Crossrefs

Programs

  • Mathematica
    a35263[n_] := 1 - Mod[IntegerExponent[n, 2], 2];
    a[1] = 3; a[n_] := a[n] = For[k = a[n - 1] + 1, True, k++, If[a35263[k] == a35263[n], Return[k]]];
    Array[a, 66] (* Jean-François Alcover, Jul 28 2018 *)
  • PARI
    is(n) = valuation(n, 2)%2==0; \\ A003159
    nexta(a, n) = {my(k=a+1, isn = is(n)); while (is(k) != isn, k++); k;};
    lista(nn) = {my(a = 3); print1(a, ", "); for (n=2, nn, a = nexta(a, n); print1(a, ", "););} \\ Michel Marcus, Dec 15 2018

Formula

a(n+1) = min{ m>a(n): A035263(m)=A035263(n+1) }.
a(n)=2n+1, if A007814(n) is even. a(n)=2n+2, if A007814(n) is odd.
A010060(a(n))=1-A010060(n)
For n>=1, A010060(a(n))= A010060(A004760(n+1)). See also A160230. [Vladimir Shevelev, May 05 2009]

Extensions

Edited by R. J. Mathar, May 08 2009

A206332 Complement of A092754.

Original entry on oeis.org

2, 5, 6, 11, 12, 13, 14, 23, 24, 25, 26, 27, 28, 29, 30, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122
Offset: 1

Views

Author

Reinhard Zumkeller, May 07 2012

Keywords

Comments

Conjecture: these are the positions words in A076478 that start with 0 and end with 1. - Clark Kimberling, Jul 14 2021

Crossrefs

Cf. A004755, A004760, A092754 (complement).

Programs

  • Haskell
    a206332 n = a206332_list !! (n-1)
    a206332_list = compl [1..] a092754_list where
       compl (u:us) vs'@(v:vs) | u == v = compl us vs
                               | u /= v = u : compl us vs'
    
  • PARI
    a(n) = n + 2<Kevin Ryde, Jun 19 2021

Formula

a(n) = A004760(n+2) - 1. - Rémy Sigrist, May 05 2019
a(n) = A004755(n) - 1. - Kevin Ryde, Jun 19 2021

A293437 Numbers n that are persistently squarefree for base-2 shifting (in A293430), and for which A163511(n) is also in A293430.

Original entry on oeis.org

1, 3, 6, 7, 13, 14, 15, 26, 29, 30, 31, 58, 62, 239, 247, 478, 479, 494, 958, 245757, 491514
Offset: 1

Views

Author

Antti Karttunen, Oct 11 2017

Keywords

Comments

The motivation for this sequence is the observation that one of the necessary conditions for inclusion in A293430 is almost the same as for what is required from k that A163511(k) were squarefree. Namely, all terms of A293430 can be found in A003754 (the former is a subsequence of the latter), while A163511(k) yields a squarefree number if and only if k is in A280873, which is a subsequence of A003754 (actually its intersection with A004760). Thus this sequence must be in the intersection of A293430 and A004760, which implies that the binary expansion of all terms is free of adjacent 0's and furthermore, none begins with bits "10". Indeed, in base-2 the terms look as: 1, 11, 110, 111, 1101, 1110, 1111, 11010, 11101, 11110, 11111, 111010, 111110, 11101111, 11110111, 111011110, 111011111, 111101110, 1110111110, 111011111111111101, 1110111111111111010.
A163511 applied to the first 21 terms yields 2, 3, 6, 5, 15, 10, 7, 30, 21, 14, 11, 42, 22, 187, 119, 374, 247, 238, 494, 6837, 13674, that in binary look like: 10, 11, 110, 101, 1111, 1010, 111, 11110, 10101, 1110, 1011, 101010, 10110, 10111011, 1110111, 101110110, 11110111, 11101110, 111101110, 1101010110101, 11010101101010. These are of course numbers such that both n and A243071(n) are in A293430, but not listed in ascending order.
Question: Is this sequence finite?
See also the binary tree illustration in A293230.

Examples

			For n = 245757 which itself is squarefree (as 245757 = 3*81919) applying the map x -> floor(x/2) iteratively down to 1 yields a finite sequence 122878, 61439, 30719, 15359, 7679, 3839, 1919, 959, 479, 239, 119, 59, 29, 14, 7, 3, 1, whose terms are all squarefree also. Moreover, A163511(245757) = 6837 = 3*43*53, a squarefree number too (this is already guaranteed by the fact that the two most significant bits in base-2 expansion of 245757 are both 1's). Applying the same approximate halving map iteratively yields now the sequence: 3418, 1709, 854, 427, 213, 106, 53, 26, 13, 6, 3, 1, and also here every term is squarefree. Thus 245757 is included in this sequence.
		

Crossrefs

Programs

  • PARI
    default(primelimit,(2^31)+(2^30));
    is_persistently_squarefree(n,base) = { while(n>1, if(!issquarefree(n),return(0)); n \= base); (1); };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
    A054429(n) = ((3<<#binary(n\2))-n-1); \\ After M. F. Hasler, Aug 18 2014
    A163511(n) = if(!n,1,A005940(1+A054429(n)));
    isA293430(n) = is_persistently_squarefree(n,2);
    n=0; k=1; while(n <= 2^26, n=n+1; if(isA293430(n)&&isA293430(A163511(n)),write("b293437.txt", k, " ", n);k=k+1));
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A293437 (MATCHING-POS 1 1 (lambda (n) (and (not (zero? (A293233 n))) (not (zero? (A293233 (A163511 n))))))))

Formula

n is present if and only if A293233(n)*A293233(A163511(n)) <> 0.

A065628 Permutation of N induced by rotating the node 2 left in the infinite planar binary tree. The second row of A065626. Inverse of A065627.

Original entry on oeis.org

1, 4, 3, 8, 2, 6, 7, 16, 17, 9, 5, 12, 13, 14, 15, 32, 33, 34, 35, 18, 19, 10, 11, 24, 25, 26, 27, 28, 29, 30, 31, 64, 65, 66, 67, 68, 69, 70, 71, 36, 37, 38, 39, 20, 21, 22, 23, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 72, 73, 74, 75, 76, 77, 78, 79, 40
Offset: 1

Views

Author

Antti Karttunen, Nov 08 2001

Keywords

Crossrefs

Stabilizes the set A004760.

Programs

  • Maple
    [seq(RotateNodeLeft(2,j),j=1..120)];

A080565 Binary expansion of n has form 11**...*1.

Original entry on oeis.org

3, 7, 13, 15, 25, 27, 29, 31, 49, 51, 53, 55, 57, 59, 61, 63, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233
Offset: 1

Views

Author

Benoit Cloitre, Feb 22 2003

Keywords

Comments

If n>3 is in the sequence so are 2n-1 and 2n+1.

Crossrefs

A004755 = union of A079946 and this sequence.
A diagonal of A246830.

Formula

a(n) = 2^floor(log[2](4*(n-1)))+2*n-1 for n>1, a(1)=3. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 22 2003
Equals 2 * A004760(n) + 1. - Ralf Stephan, Sep 16 2003

A129602 In the binary expansion of n replace each run of k 0's (or 1's) with 2k-1 0's (or 1's), except in the most significant run where we double the number of 0's (or 1's).

Original entry on oeis.org

0, 3, 6, 15, 24, 13, 30, 63, 96, 49, 26, 55, 120, 61, 126, 255, 384, 193, 98, 199, 104, 53, 110, 223, 480, 241, 122, 247, 504, 253, 510, 1023, 1536, 769, 386, 775, 392, 197, 398, 799, 416, 209, 106, 215, 440, 221, 446, 895, 1920, 961, 482, 967, 488, 245, 494
Offset: 0

Views

Author

Antti Karttunen, May 01 2007

Keywords

Examples

			a(1) = 3, as 1 is 1 in binary and doubling the number of 1's (in the only run) gives binary 11, 3 in decimal. a(9) = 49, as 9 is 1001 in binary and replacing the most significant run '1' with '11' and the center run '00' with '000' and the least significant run '1' with '1', we get 110001 in binary, 49 in decimal.
		

Crossrefs

Central diagonal of array A129600, a(n) = A129600bi(n, n). Cf. A129594. For n > 0, a(n) = A004760(A129603(n)+1).

Extensions

Edited definition. - N. J. A. Sloane, Dec 20 2023

A246834 A(n,k) is the concatenation of n and k*n in binary; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 3, 2, 0, 6, 10, 3, 0, 7, 20, 15, 4, 0, 12, 22, 30, 36, 5, 0, 13, 40, 57, 72, 45, 6, 0, 14, 42, 60, 76, 90, 54, 7, 0, 15, 44, 63, 144, 95, 108, 63, 8, 0, 24, 46, 114, 148, 180, 210, 126, 136, 9, 0, 25, 80, 117, 152, 185, 216, 245, 272, 153, 10
Offset: 0

Views

Author

Alois P. Heinz, Sep 04 2014

Keywords

Examples

			Square array A(n,k) begins:
  0,   0,   0,   0,   0,   0,   0,   0,    0, ...
  1,   3,   6,   7,  12,  13,  14,  15,   24, ...
  2,  10,  20,  22,  40,  42,  44,  46,   80, ...
  3,  15,  30,  57,  60,  63, 114, 117,  120, ...
  4,  36,  72,  76, 144, 148, 152, 156,  288, ...
  5,  45,  90,  95, 180, 185, 190, 355,  360, ...
  6,  54, 108, 210, 216, 222, 420, 426,  432, ...
  7,  63, 126, 245, 252, 483, 490, 497,  504, ...
  8, 136, 272, 280, 544, 552, 560, 568, 1088, ...
		

Crossrefs

Columns k=0,1,3 give: A001477, A020330, A246831.
Rows n=0, 1 give: A000004, A004760(k+1).

Programs

  • Maple
    f:= proc(i, j) local r, h, k; r:=0; h:=0; k:=j;
          while k>0 do r:=r+2^h*irem(k, 2, 'k'); h:=h+1 od; k:=i;
          while k>0 do r:=r+2^h*irem(k, 2, 'k'); h:=h+1 od; r
        end:
    A:= (n, k)-> f(n, k*n):
    seq(seq(A(n, d-n), n=0..d), d=0..14);

A053642 Rotate n one binary digit to the left, drop leading zeros, then rotate one binary digit to the right.

Original entry on oeis.org

1, 1, 3, 1, 3, 6, 7, 1, 3, 6, 7, 12, 13, 14, 15, 1, 3, 6, 7, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31, 1, 3, 6, 7, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 1
Offset: 1

Views

Author

Henry Bottomley, Mar 22 2000

Keywords

Comments

Sequence contains ever-longer copies of A004760. - Ralf Stephan, Sep 16 2003

Examples

			a(22)=14 because starting with 10110 the left rotation produces 01101 written as 1101 (i.e., 13) and the right rotation produces 1110 (i.e., 14).
		

Crossrefs

Cf. A053641 (right then left).

Programs

  • Mathematica
    rtt[f_, n_] := FromDigits[f[IntegerDigits[n, 2]], 2];
    Array[rtt[RotateRight, rtt[RotateLeft, #]]&, 100] (* Paolo Xausa, Jan 16 2024 *)
  • PARI
    a(n) = n-=1<Kevin Ryde, Jan 13 2024

Formula

a(n) = A038572(A006257(n)).
a(n) = n if 3*2^(k-1) <= n < 2^(k+1);
a(n) = a(n - 2^(k-1)) if 2^k <= n < 3*2^(k-1).
a(2n) = 2a(n) - [a(n)==1], a(2n+1) = 2a(n) + 1. - Ralf Stephan, Sep 16 2003
Previous Showing 21-30 of 39 results. Next