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 51-60 of 66 results. Next

A373183 Irregular table T(n, k), n >= 0, k > 0, read by rows with row polynomials R(n, x) such that R(2n+1, x) = x*R(n, x) for n >= 0, R(2n, x) = x*(R(n, x+1) - R(n, x)) for n > 0 with R(0, x) = x.

Original entry on oeis.org

1, 0, 1, 1, 2, 0, 0, 1, 3, 4, 0, 1, 2, 1, 3, 3, 0, 0, 0, 1, 7, 8, 0, 3, 4, 3, 8, 6, 0, 0, 1, 2, 7, 15, 9, 0, 1, 3, 3, 1, 4, 6, 4, 0, 0, 0, 0, 1, 15, 16, 0, 7, 8, 7, 18, 12, 0, 0, 3, 4, 17, 34, 18, 0, 3, 8, 6, 3, 11, 15, 8, 0, 0, 0, 1, 2, 31, 57, 27, 0, 7, 15
Offset: 0

Views

Author

Mikhail Kurkov, May 27 2024

Keywords

Comments

Row n length is A000120(n) + 1.

Examples

			Irregular table begins:
  1;
  0,  1;
  1,  2;
  0,  0, 1;
  3,  4;
  0,  1, 2;
  1,  3, 3;
  0,  0, 0, 1;
  7,  8;
  0,  3, 4;
  3,  8, 6
  0,  0, 1, 2
  7, 15, 9;
  0,  1, 3, 3;
  1,  4, 6, 4;
  0,  0, 0, 0, 1;
		

Crossrefs

Programs

  • PARI
    row(n) = my(x = 'x, A = x); forstep(i=if(n == 0, -1, logint(n, 2)), 0, -1, A = if(bittest(n, i), x*A, x*(subst(A, x, x+1) - A))); Vecrev(A/x)

Formula

Conjectured formulas: (Start)
R(2n, x) = R(n, x) + R(n - 2^f(n), x) + R(2n - 2^f(n), x) where f(n) = A007814(n) (see A329369).
b(2^m*n + q) = Sum_{i=A001511(n+1)..A000120(n)+1} T(n, i)*b(2^m*(2^(i-1)-1) + q) for n >= 0, m >= 0, q >= 0 where b(n) = A329369(n). Note that this formula is recursive for n != 2^k - 1.
R(n, x) = c(n, x)
where c(2^k - 1, x) = x^(k+1) for k >= 0,
c(n, x) = Sum_{i=0..s(n)} p(n, s(n)-i)*Sum_{j=0..i} (s(n)-j+1)^A279209(n)*binomial(i, j)*(-1)^j,
p(n, k) = Sum_{i=0..k} c(t(n) + (2^i - 1)*A062383(t(n)), x)*L(s(n), k, i) for 0 <= k < s(n) with p(n, s(n)) = c(t(n) + (2^s(n) - 1)*A062383(t(n)), x),
s(n) = A090996(n), t(n) = A087734(n),
L(n, k, m) are some integer coefficients defined for n > 0, 0 <= k < n, 0 <= m <= k that can be represented as W(n-m, k-m, m+1)
and where W(n, k, m) = (k+m)*W(n-1, k, m) + (n-k)*W(n-1, k-1, m) + [m > 1]*W(n, k, m-1) for 0 <= k < n, m > 0 with W(0, 0, m) = 1, W(n, k, m) = 0 for n < 0 or k < 0.
In particular, W(n, k, 1) = A173018(n, k), W(n, k, 2) = A062253(n, k), W(n, k, 3) = A062254(n, k) and W(n, k, 4) = A062255(n, k).
Here s(n), t(n) and A279209(n) are unique integer sequences such that n can be represented as t(n) + (2^s(n) - 1)*A062383(t(n))*2^A279209(n) where t(n) is minimal. (End)
Conjectures from Mikhail Kurkov, Jun 19 2024: (Start)
T(n, k) = d(n, 1, A000120(n) - k + 2) where d(n, m, k) = (m+1)^g(n)*d(h(n), m+1, k) - m^(g(n)+1)*d(h(n), m, k-1) for n > 0, m > 0, k > 0 with d(n, m, 0) = 0 for n >= 0, m > 0, d(0, m, k) = [k <= m]*abs(Stirling1(m, m-k+1)) for m > 0, k > 0, g(n) = A290255(n) and where h(n) = A053645(n). In particular, d(n, 1, 1) = A341392(n).
Sum_{i=A001511(n+1)..wt(n)+k} d(n, k, wt(n)-i+k+1)*A329369(2^m*(2^(i-1)-1) + q) = k!*A357990(2^m*n + q, k) for n >= 0, k > 0, m >= 0, q >= 0 where wt(n) = A000120(n).
If we change R(0, x) to Product_{i=0..m-1} (x+i), then for resulting irregular table U(n, k, m) we have U(n, k, m) = d(n, m, A000120(n) - k + m + 1).
T(n, k) = (-1)^(wt(n)-k+1)*Sum_{i=1..wt(n)-k+3} Stirling1(wt(n)-i+3, k+1)*A358612(n, wt(n)-i+3) for n >= 0, k > 0 where wt(n) = A000120(n). (End)
Conjecture: T(2^m*(2k+1), q) = (-1)^(wt(k)-q)*Sum_{i=q..wt(k)+2} Stirling1(i,q)*A358612(k,i)*i^m for m >= 0, k >= 0, q > 0 where wt(n) = A000120(n). - Mikhail Kurkov, Jan 17 2025

A376091 Number of binary words of length n avoiding distance (i+1) between "1" digits if the i-th bit is set in the binary representation of n.

Original entry on oeis.org

1, 2, 4, 4, 12, 11, 17, 14, 81, 57, 81, 61, 260, 126, 236, 106, 5000, 1623, 2653, 1181, 6848, 4751, 2838, 1286, 42024, 7526, 14272, 6416, 55012, 10422, 21992, 3970, 12595401, 1148865, 2411809, 268605, 2146689, 656872, 1018489, 186997, 25401600, 5147033, 1567504
Offset: 0

Views

Author

Alois P. Heinz, Sep 09 2024

Keywords

Comments

Also the number of subsets of [n] avoiding distance (i+1) between elements if the i-th bit is set in the binary representation of n. a(6) = 17: {}, {1}, {2}, {3}, {4}, {5}, {6}, {1,2}, {1,5}, {1,6}, {2,3}, {2,6}, {3,4}, {4,5}, {5,6}, {1,2,6}, {1,5,6}.

Examples

			a(6) = 17: 000000, 000001, 000010, 000011, 000100, 000110, 001000, 001100, 010000, 010001, 011000, 100000, 100001, 100010, 100011, 110000, 110001 because 6 = 110_2 and no two "1" digits have distance 2 or 3.
		

Crossrefs

Main diagonal of A376033.

Programs

  • Maple
    h:= proc(n) option remember; `if`(n=0, 1, 2^(1+ilog2(n))) end:
    b:= proc(n, k, t) option remember; `if`(n=0, 1, add(`if`(j=1 and
          Bits[And](t, k)>0, 0, b(n-1, k, irem(2*t+j, h(k)))), j=0..1))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..50);

Formula

a(2^n-1) = A376697(n).

A065273 The siteswap sequence (the deltas p[i]-i, i in ]-inf,+inf[, folded from Z to N, mapping 0->1, 1->2, -1->3, 2->4, -2->5, etc.) for A065272.

Original entry on oeis.org

0, 2, 2, 4, 1, 4, 5, 8, 2, 8, 2, 8, 11, 8, 11, 16, 4, 16, 4, 16, 4, 16, 4, 16, 23, 16, 23, 16, 23, 16, 23, 32, 8, 32, 8, 32, 8, 32, 8, 32, 8, 32, 8, 32, 8, 32, 8, 32, 47, 32, 47, 32, 47, 32, 47, 32, 47, 32, 47, 32, 47, 32, 47, 64, 16, 64, 16, 64, 16, 64, 16, 64, 16, 64, 16, 64, 16, 64
Offset: 1

Views

Author

Antti Karttunen, Oct 28 2001

Keywords

Crossrefs

The bisection of even terms (the positive half of Z) is given by A062383 and the bisection of odd terms (the nonpositive half of Z) is given by A065274.

A089618 Continued fraction elements constructed out of a van der Corput discrepancy sequence. Interpreted as such, it is the simple continued fraction of 0.461070495956719519354149869336699687678...

Original entry on oeis.org

0, 2, 5, 1, 11, 1, 3, 1, 22, 2, 4, 1, 7, 1, 2, 1, 45, 2, 4, 1, 8, 1, 3, 1, 14, 1, 3, 1, 6, 1, 2, 1, 91, 2, 4, 1, 9, 1, 3, 1, 17, 2, 3, 1, 6, 1, 2, 1, 30, 2, 4, 1, 7, 1, 2, 1, 12, 1, 3, 1, 5, 1, 2, 1, 184, 2, 5, 1, 10, 1, 3, 1, 20, 2, 4, 1, 6, 1, 2, 1, 36, 2, 4
Offset: 0

Views

Author

Hans Havermann, Jan 03 2004

Keywords

Comments

The authors of On the Khintchine Constant posit that the geometric mean of the sequence (interpreted as a simple continued fraction expansion) is Khinchin's constant "on the idea that the discrepancy sequence is in a certain sense equidistributed."
That conjecture has been proven by Wieting. Moreover, the r-th power mean of the sequence (except a(0)=0, of course) also converges to the corresponding constant K_r for any real r<1. - Andrey Zabolotskiy, Feb 20 2017

Examples

			40 is 101000 in base 2, so b(40) = 0.078125 (the equivalent of binary 0.000101), 1/(2^0.078125-1) is approximately 17.97 and a(40) is the integer part of this: 17.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (m = IntegerDigits[n, 2]; l = Length[m]; s = "2^^."; Do[s = s <> ToString[m[[i]]], {i, l, 1, -1}]; Floor[1/(2^ToExpression[s]-1)]); Prepend[Table[a[i], {i, 1, 120}], 0]
    a[n_] := If[n==0, 0, Floor[1 / (2^FromDigits[{Reverse[IntegerDigits[n,2]],0},2] - 1)]]; (* Andrey Zabolotskiy, Feb 20 2017 *)

Formula

a(n) = integer part of 1/(2^b(n)-1) where b(n) = digit-reversal of binary of (positive integer) n, preceded by a decimal point and converted (from base 2) to base 10; initial term, a(0), is defined as 0.
a(n) = floor(1/(2^(A030101(n)/A062383(n))-1)) for n>0. - Andrey Zabolotskiy, Feb 20 2017

A162473 Write n in binary n times and concatenate (see example). a(n) is the decimal equivalent.

Original entry on oeis.org

1, 10, 63, 2340, 23405, 224694, 2097151, 2290649224, 41231686041, 733007751850, 12900936432571, 225179981368524, 3903119677054429, 67253754435399406, 1152921504606846975, 623961713349486025654800, 21214698253882524872263217, 718803893778607901554330194
Offset: 1

Views

Author

Leroy Quet, Jul 04 2009

Keywords

Examples

			The binary representations of the first few terms are 1, 1010, 111111, 100100100100, 101101101101101.
		

Crossrefs

Programs

  • Maple
    A070939 := proc(n) max(1, ilog2(n)+1) ; end: A162473 := proc(n) local bid,a062383; bid := A070939(n) ; a062383 := 2^bid ; n*(a062383^n-1)/(a062383-1) ; end: seq(A162473(n),n=1..30) ; # R. J. Mathar, Jul 06 2009
    # second Maple program:
    a:= n-> Bits[Join](map(x-> x[], [Bits[Split](n)$n])):
    seq(a(n), n=1..30);  # Alois P. Heinz, Oct 26 2020
  • Mathematica
    Table[FromDigits[Flatten[Table[IntegerDigits[n,2],{n}]],2],{n,20}] (* Harvey P. Dale, Jun 15 2021 *)

Formula

a(n) = n * (2^(A070939(n)*n) - 1) / (2^(A070939(n)) - 1). - Maxim Skorohodov, Oct 26 2020

Extensions

More terms from R. J. Mathar, Jul 06 2009

A254575 Triangle T(n,k) in which the n-th row encodes how to hang a picture by wrapping rope around n nails using a polynomial number of twists, such that removing one nail causes the picture to fall; n>=1, 1<=k<=A073121(n).

Original entry on oeis.org

1, 1, 2, -1, -2, 1, 2, -1, -2, 3, 2, 1, -2, -1, -3, 1, 2, -1, -2, 3, 4, -3, -4, 2, 1, -2, -1, 4, 3, -4, -3, 1, 2, -1, -2, 3, 2, 1, -2, -1, -3, 4, 5, -4, -5, 3, 1, 2, -1, -2, -3, 2, 1, -2, -1, 5, 4, -5, -4, 1, 2, -1, -2, 3, 2, 1, -2, -1, -3, 4, 5, -4, -5, 6, 5
Offset: 1

Views

Author

Alois P. Heinz, Feb 01 2015

Keywords

Comments

In step k the rope has to be wrapped around nail |T(n,k)| clockwise if T(n,k)>0 and counterclockwise if T(n,k)<0.
1 or (-1) appears A062383(n-1) times in row n.
n or (-n) appears A053644(n) times in row n.

Examples

			Triangle T(n,k) begins:
  1;
  1, 2, -1, -2;
  1, 2, -1, -2, 3, 2,  1, -2, -1, -3;
  1, 2, -1, -2, 3, 4, -3, -4,  2,  1, -2, -1, 4, 3, -4, -3;
		

Crossrefs

Row sums give A063524.

Programs

  • Maple
    r:= s-> seq(-s[-k], k=1..nops(s)):
    T:= proc(n) option remember; `if`(n=1, 1, (m->
          ((x, y)-> [x[], y[], r(x), r(y)][])([T(m)],
           map(h-> h+sign(h)*m, [T(n-m)])))(iquo(n+1, 2)))
        end:
    seq(T(n), n=1..7);
  • Mathematica
    r[s_List] := -Reverse[s];
    T[1] = {1}; T[n_] := T[n] = Module[{ m = Quotient[n+1, 2]}, Function[{x, y}, {x, y, r[x], r[y]} // Flatten][T[m], Function[h, h + Sign[h]*m] /@ T[n - m]]];
    Table[T[n], {n, 1, 7}] // Flatten (* Jean-François Alcover, Nov 06 2017, after Alois P. Heinz *)

A293390 Least m such that the exponents in expression for n as a sum of distinct powers of 2 are pairwise distinct mod m; a(0) = 0 by convention.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Oct 08 2017

Keywords

Comments

The set of exponents in expression for n as a sum of distinct powers of 2 corresponds to the n-th row of A133457.
The sum of digits of n in base 2^a(n), say s, can be computed without carry in base 2; the Hamming weight of s equals the Hamming weight of n.
a(n) >= A000120(n) for any n > 0.
Apparently, a(n) = A000120(n) iff n = 0 or n belongs to A100290.
a(n) <= A070939(n) for any n >= 0.
For any sequence s of distinct nonnegative integers (s(n) being defined for n >= 0):
- let D_s be defined for any n > 0 by D_s(n) = a(Sum_{k=0..n-1} 2^s(k)),
- then D_s is the discriminator of s as introduced by Arnold, Benkoski, and McCabe in 1985,
- D_s(1) = 1,
- D_s(n) >= n for any n >= 1,
- D_s(n+1) >= D_s(n) for any n >= 1.

Examples

			For n=42:
- 42 = 2^5 + 2^3 + 2^1,
- 5 mod 1 = 3 mod 1,
- 5 mod 2 = 3 mod 2,
- 5 mod 3, 3 mod 3 and 1 mod 3 are all distinct,
- hence a(42) = 3.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L,D,k;
      L:= convert(n,base,2);
      L:= select(t -> L[t+1]=1, [$0..nops(L)-1]);
      if nops(L) = 1 then return 1 fi;
      D:= {seq(seq(L[j]-L[i],i=1..j-1),j=2..nops(L))};
      D:= `union`(seq(numtheory:-divisors(i),i=D));
      min({$2..max(D)+1} minus D)
    end proc:
    0, seq(f(i),i=1..100); # Robert Israel, Oct 08 2017
  • Mathematica
    {0}~Join~Table[Function[r, SelectFirst[Range@ 10, Length@ Union@ Mod[r, #] == Length@ r &]][Join @@ Position[#, 1] - 1 &@ Reverse@ IntegerDigits[n, 2]], {n, 86}] (* Michael De Vlieger, Oct 08 2017 *)
  • PARI
    a(n) = if (n, my (d=Vecrev(binary(n)), x = []); for (i=1, #d, if (d[i], x = concat(x, i-1))); for (m=1, oo, if (#Set(vector(#x, i, x[i]%m))==#x, return (m))), return (0))

Formula

a(2*n) = a(n) for any n >= 0.
a(2^k-1) = k for any k >= 0.
a(n) = 1 iff n = 2^k for some k >= 0.
a(n) = 2 iff n belongs to A173195.
a(Sum_{k=1..n} 2^(k^2)) = A016726(n) for any n >= 1.
a(Sum_{k=1..n} 2^A000069(k)) = A062383(n) for any n >= 1.
a(Sum_{k=0..n} 2^(2^k)) = A270097(n) for any n >= 0.
a(Sum_{k=1..n} 2^A000045(k+1)) = A270151(n) for any n >= 1.
a(Sum_{k=1..n} 2^A000041(k)) = A270176(n) for any n >= 1.
a(A076793(n)) = A272633(n) for any n >= 0.
a(Sum_{k=1..n} 2^A001969(k)) = A272881(n) for any n >= 1.
a(Sum_{k=1..n} 2^A005823(k)) = A272882(n) for any n >= 1.
a(Sum_{k=1..n} 2^A000215(k-1)) = A273037(n) for any n >= 1.
a(Sum_{k=1..n} 2^A000108(k)) = A273041(n) for any n >= 1.
a(Sum_{k=1..n} 2^A001566(k)) = A273043(n) for any n >= 1.
a(Sum_{k=1..n} 2^A003095(k)) = A273044(n) for any n >= 1.
a(Sum_{k=1..n} 2^A000058(k-1)) = A273056(n) for any n >= 1.
a(Sum_{k=1..n} 2^A002808(k)) = A273062(n) for any n >= 1.
a(Sum_{k=1..n} 2^(k!)) = A273064(n) for any n >= 1.
a(Sum_{k=1..n} 2^(k^k)) = A273068(n) for any n >= 1.
a(Sum_{k=1..n} 2^A000110(k)) = A273237(n) for any n >= 1.
a(Sum_{k=1..n} 2^A001147(k)) = A273377(n) for any n >= 1.

A344851 a(n) = (n^2) mod (2^A070939(n)).

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 4, 1, 0, 1, 4, 9, 0, 9, 4, 1, 0, 1, 4, 9, 16, 25, 4, 17, 0, 17, 4, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 0, 17, 36, 57, 16, 41, 4, 33, 0, 33, 4, 41, 16, 57, 36, 17, 0, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100
Offset: 0

Views

Author

Rémy Sigrist, May 30 2021

Keywords

Comments

Informally, if n has w binary digits, a(n) is obtained by keeping the w final binary digits of n^2.
For n > 0, a(n) is the final digit of n^2 in base A062383(n).
This sequence has interesting graphical features (see illustration in Links section).

Examples

			For n = 42:
- A070939(42) = 6,
- a(42) = (42^2) mod (2^6) = 1764 mod 64 = 36.
		

Crossrefs

Cf. A000290, A048152, A062383, A070939, A086341, A116882, A316347 (decimal analog).

Programs

  • Mathematica
    {0}~Join~Table[Mod[n^2,2^(1+Floor@Log2@n)],{n,100}] (* Giorgos Kalogeropoulos, Jun 02 2021 *)
  • PARI
    a(n) = (n^2) % 2^#binary(n)
    
  • Python
    def a(n): return (n**2) % (2**n.bit_length())
    print([a(n) for n in range(75)]) # Michael S. Branicky, May 30 2021

Formula

a(n) = 0 iff n = 0 or n > 1 and n belongs to A116882.
a(n) = 1 iff n belongs to A086341.
a(2^k + m) = a(2^(k+1)-m) for any k > 0 and m = 0..2^k.

A211171 Exponent of general linear group GL(n,2).

Original entry on oeis.org

1, 6, 84, 420, 26040, 78120, 9921240, 168661080, 24624517680, 270869694480, 554470264600560, 7208113439807280, 59041657185461430480, 2538791258974841510640, 383357480105201068106640, 98522872387036674503406480, 25826982813282567927671981480160
Offset: 1

Views

Author

Alexander Gruber, Jan 31 2013

Keywords

Comments

a(n) is the smallest integer for which x^a(n) = 1 for any x in GL(n,2).

Examples

			n = 2: GL(2,2) is isomorphic to S3 which has exponent 6 (see: A003418).
n = 3: The set of element orders of GL(3,2) is {1,2,3,4,7} so the exponent is 84.
n = 5: The set of element orders of GL(5,2) is {1,2,3,4,5, 6,7,8,12,14, 15,21,31} so the exponent is 26040 (see: A053651).
		

Crossrefs

Cf. A006951 (number of conjugacy classes in GL(n,2)).

Programs

  • Magma
    for n in [1..18] do
    Exponent(GL(n,2));
    end for;
    
  • Maple
    with(numtheory):
    a:= proc(n) local t; t:= 2^ilog2(n);
          `if`(tAlois P. Heinz, Feb 04 2013
  • Mathematica
    f[q_, n_] := With[{p = Sort[Divisors[q]][[2]]},
      p^Ceiling[Log[p, n]] Product[Cyclotomic[k, q], {k, n}]]; f[2,#]&/@Range[100]
  • PARI
    a(n) = 2^ceil(log(n)/log(2))*prod(k=1, n, polcyclo(k, 2)); \\ Michel Marcus, Jan 29 2020

Formula

a(n) = 2^ceiling(log_2(n)) * Product_{k=1..n} (k-th cyclotomic polynomial evaluated at 2).
a(n) = A034268(n)*A062383(n+1). - Michel Marcus, Jul 29 2022

A296613 Smallest k such that either k >= n and k is a power of 2, or k >= 5n/3 and the prime divisors of k are precisely 2 and 5.

Original entry on oeis.org

1, 2, 4, 4, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 128, 128
Offset: 1

Views

Author

Eric M. Schmidt, Dec 16 2017

Keywords

Comments

First disagreement with A062383(n-1) is at n = 129.
For n > 2, a(n) is not squarefree. - Iain Fox, Dec 17 2017

Crossrefs

Cf. A033846.

Programs

  • PARI
    a(n) = for(k=n, +oo, if(k == 2^valuation(k, 2) || (k >= 5*n/3 && factor(k)[, 1] == [2, 5]~), return(k))) \\ Iain Fox, Dec 17 2017
Previous Showing 51-60 of 66 results. Next