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 11-20 of 853 results. Next

A272756 a(n) is the least k such that k > A070939(n * k).

Original entry on oeis.org

3, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11
Offset: 1

Views

Author

Peter Kagey, May 05 2016

Keywords

Examples

			a(1) = 3 because 3 > A070939(1 * 3) = 2.
a(2) = 5 because 5 > A070939(2 * 5) = 4.
a(5) = 6 because 6 > A070939(5 * 6) = 5.
		

Crossrefs

Cf. A070939.

Programs

  • Mathematica
    Table[SelectFirst[Range[2^12], # > IntegerLength[n #, 2] &], {n, 80}] (* Michael De Vlieger, May 05 2016, Version 10 *)

A334796 a(n) = (A070939(A334769(n)) - A334770(n))/3.

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, May 12 2020

Keywords

Comments

An XOR-triangle T(m) is an inverted 0-1 triangle formed by choosing a top row the binary rendition of n and having each entry in subsequent rows be the XOR of the two values above it, i.e., A038554(m) applied recursively until we reach a single bit.
A334556 is the sequence of rotationally symmetrical T(m).
A central zero-triangle (CZT) is a field of contiguous 0-bits, listed in A334769, a subset of A334556. CZTs have side length k = A334770(n), surrounded on all sides by a layer of 1 bits, and generally j > 1 bits of any parity.
This sequence describes the "frame width" j.
Smallest n with a given value of j appears in A334836. - Michael De Vlieger, May 20 2020

Examples

			a(4) pertains to T(599), with A334770(4) = 4.
(1 + A070939(599) - 4)/3 = (1 + 9 - 4)/3 = 6/3 = 2, thus a(4) = 2.
(Diagram, replacing 0 with “.”):
  1 . . 1 . 1 . 1 1 1
   1 . 1 1 1 1 1 . .
    1 1 . . . . 1 .
     . 1 . . . 1 1
      1 1 . . 1 .
       . 1 . 1 1
        1 1 1 .
         . . 1
          . 1
           1
a(11) pertains to T(2359), with A334770(11) = 3.
(1 + A070939(2359) - 4)/3 = (1 + 11 - 3)/3 = 9/3 = 3, thus a(11) = 3.
(Diagram):
  1 . . 1 . . 1 1 . 1 1 1
   1 . 1 1 . 1 . 1 1 . .
    1 1 . 1 1 1 1 . 1 .
     . 1 1 . . . 1 1 1
      1 . 1 . . 1 . .
       1 1 1 . 1 1 .
        . . 1 1 . 1
         . 1 . 1 1
          1 1 1 .
           . . 1
            . 1
             1
From _Michael De Vlieger_, May 14 2020: (Start)
Linear recurrences that produce XOR-triangles with frame length j (table may not be exhaustive):
j   LR          Lower               Upper
-----------------------------------------------------
2   (5, -4)     {39, 151}           {57, 223}
3   (17, -16)   {543, 8607}         {993, 15969}
                {1379, 22115}       {1589, 25397}
                {1483, 23755}       {1693, 27037}
                {2359, 37687}       {3785, 60617}
4   (17, -16)   {22243, 356067}     {25525, 408501}
                {39047, 624775}     {57625, 921881}
                {40679, 650983}     {59257, 948089}
                {171475, 2743763}   {208613, 3337957}
                {356067, 5697251}   {408501, 6536117}
... (End)
		

Crossrefs

Programs

  • Mathematica
    Block[{f, s = Rest[Import["https://oeis.org/A334556/b334556.txt", "Data"][[All, -1]] ]}, f[n_] := NestWhileList[Map[BitXor @@ # &, Partition[#, 2, 1]] &, IntegerDigits[n, 2], Length@ # > 1 &]; Array[Block[{n = s[[#]]}, If[# == 0, Nothing, (1 + Floor@ Log2[n] - #)/3] &@ FirstCase[MapIndexed[If[2 #2 > #3 + 1, Nothing, #1[[#2 ;; -#2]]] & @@ {#1, First[#2], Length@ #1} &, f[n][[1 ;; Ceiling[IntegerLength[#, 2]/(2 Sqrt[3])] + 3]] ],r_List /; FreeQ[r, 1] :> Length@ r] /. k_ /; MissingQ@ k -> 0] &, Length@ s - 1, 2] ]

A345927 Alternating sum of the binary expansion of n (row n of A030190). Replace 2^k with (-1)^(A070939(n)-k) in the binary expansion of n (compare to the definition of A065359).

Original entry on oeis.org

0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 2, 1, 0, -1, 1, 0, 1, 2, 0, 1, 2, 3, 1, 2, 0, 1, -1, 0, 1, 2, 0, 1, 1, 0, 2, 1, 0, -1, 1, 0, 2, 1, 3, 2, 1, 0, 2, 1, 0, -1, 1, 0, -1, -2, 0, -1, 1, 0, 2, 1, 0, -1, 1, 0, 1, 2, 0, 1, 2, 3, 1, 2, 0, 1, -1, 0, 1, 2, 0, 1, 2, 3, 1, 2
Offset: 0

Views

Author

Gus Wiseman, Jul 14 2021

Keywords

Comments

The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The binary expansion of 53 is (1,1,0,1,0,1), so a(53) = 1 - 1 + 0 - 1 + 0 - 1 = -2.
		

Crossrefs

Binary expansions of each nonnegative integer are the rows of A030190.
The positions of 0's are A039004.
The version for prime factors is A071321 (reverse: A071322).
Positions of first appearances are A086893.
The version for standard compositions is A124754 (reverse: A344618).
The version for prime multiplicities is A316523.
The version for prime indices is A316524 (reverse: A344616).
A003714 lists numbers with no successive binary indices.
A070939 gives the length of an integer's binary expansion.
A103919 counts partitions by sum and alternating sum.
A328594 lists numbers whose binary expansion is aperiodic.
A328595 lists numbers whose reversed binary expansion is a necklace.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[ats[IntegerDigits[n,2]],{n,0,100}]
  • PARI
    a(n) = subst(Pol(Vecrev(binary(n))), x, -1); \\ Michel Marcus, Jul 19 2021
    
  • Python
    def a(n): return sum((-1)**k for k, bi in enumerate(bin(n)[2:]) if bi=='1')
    print([a(n) for n in range(84)]) # Michael S. Branicky, Jul 19 2021

Formula

a(n) = (-1)^(A070939(n)-1)*A065359(n).

A264982 Binary width of terms produced by match-making permutation: a(n) = A070939(A266195(n)).

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 4, 3, 4, 4, 4, 5, 4, 5, 4, 6, 4, 5, 5, 5, 6, 4, 6, 5, 7, 5, 5, 6, 5, 7, 5, 7, 5, 6, 6, 7, 6, 6, 6, 7, 5, 8, 5, 8, 5, 8, 5, 8, 5, 9, 6, 7, 6, 7, 6, 8, 6, 7, 7, 8, 7, 7, 7, 8, 7, 8, 8, 8, 6, 8, 7, 8, 7, 9, 6, 9, 6, 9, 6, 9, 6, 10, 6, 9, 6, 9, 6, 10, 6, 10, 6, 9, 7, 8, 7, 9, 7, 10, 6, 10, 6, 10, 6, 11, 6, 11, 6, 11, 6, 11, 6, 11, 6, 11, 6, 12, 7
Offset: 1

Views

Author

Antti Karttunen, Dec 26 2015

Keywords

Comments

Each n occurs A000079(n-1) = 2^(n-1) times in total.

Crossrefs

Cf. A266186 (where n first appears, most likely also the positions of records).
Cf. A266187 (where n last appears).
Cf. A266197 (gives numbers n where a(n) = a(n+1)).

Programs

Formula

a(n) = A070939(A266195(n)).

A268727 One-based index of the toggled bit between n and A268717(n+1): a(n) = A070939(A003987(n,A268717(1+n))).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 13 2016

Keywords

Comments

A fractal sequence like A268726.

Crossrefs

One more than A268726.
Cf. also array A268833.

Programs

Formula

a(n) = A001511(1+A006068(n)).
a(n) = A070939(A003987(n,A268717(1+n))).
a(n) = 1 + floor(log_2(n XOR A003188(1+A006068(n)))).
a(n) = A001511(n)*(1-A010059(n)) + 1. - Alan Michael Gómez Calderón, Jun 15 2025

A372097 Exponents k where A000120(3^k) - A070939(3^k)/2 reaches a new minimum.

Original entry on oeis.org

0, 2, 4, 7, 16, 24, 40, 49, 53, 102, 104, 126, 174, 226, 379, 768, 831, 832, 1439, 1452, 1914, 2291, 2731, 3000, 3363, 3472, 5608, 5883, 6725, 6787, 7438, 8786, 10280, 11948, 12190, 13135, 15170, 15645, 22407, 26232, 27099, 32773, 33085, 40189, 40523, 48068, 51187
Offset: 1

Views

Author

Hugo Pfoertner, Apr 25 2024

Keywords

Comments

These are the k-values of the lower envelope of the scatter band of the deviation of the binary weight of 3^k from half the length of the corresponding binary number. The corresponding negated differences are given in A372098.

Crossrefs

Programs

  • PARI
    a372097(upto) = {my (dm=-oo); for (k=0, upto, my (p=3^k, h=hammingweight(p), b=#binary(p)/2,d=b-h); if (d>dm, print1(k,", "); dm=d))};
    a372097(60000)

A372098 a(n) = A070939(3^k) - 2*A000120(3^k) with k = A372097(n).

Original entry on oeis.org

-1, 0, 1, 2, 4, 7, 8, 12, 15, 18, 25, 26, 30, 51, 75, 78, 84, 129, 133, 148, 170, 180, 183, 189, 209, 265, 279, 285, 287, 336, 369, 388, 406, 412, 445, 469, 496, 581, 711, 737, 741, 742, 873, 939, 994, 1044, 1078, 1111, 1157, 1158, 1492, 1636, 1767, 1914, 1933
Offset: 1

Views

Author

Hugo Pfoertner, Apr 25 2024

Keywords

Comments

a(n)/2 are the negated differences at supporting points of the lower envelope of the scatter band of the deviation of the binary weight of 3^k from half the length of the corresponding binary number.

Crossrefs

A372099 Exponents k where A000120(3^k) - A070939(3^k)/2 reaches a new maximum.

Original entry on oeis.org

0, 1, 3, 5, 11, 27, 71, 119, 140, 158, 198, 218, 441, 537, 538, 868, 1092, 2128, 2294, 2343, 2811, 2911, 3849, 4003, 4655, 5079, 5279, 5920, 6269, 6603, 10181, 10574, 12801, 12803, 15563, 15784, 16054, 16253, 17127, 18257, 20187, 21934, 34633, 49209, 76791, 78938
Offset: 1

Views

Author

Hugo Pfoertner, Apr 25 2024

Keywords

Comments

These are the k-values of the upper envelope of the scatter band of the deviation of the binary weight of 3^k from half the length of the corresponding binary number. The corresponding differences are given in A372100.

Crossrefs

Programs

  • PARI
    a372099(upto) = {my(dm=oo); for (k=0, upto, my (p=3^k, h=hammingweight(p), b=#binary(p)/2, d=b-h); if (d
    				

A372100 a(n) = 2*A000120(3^k) - A070939(3^k) with k = A372099(n).

Original entry on oeis.org

1, 2, 3, 4, 8, 17, 23, 29, 38, 39, 44, 56, 57, 58, 91, 114, 145, 147, 156, 168, 182, 208, 219, 239, 277, 297, 300, 307, 331, 360, 367, 442, 452, 477, 487, 492, 507, 513, 568, 571, 614, 893, 963, 1275, 1283, 1288, 1440, 1563, 1702, 1957, 2019, 2440, 2471, 2566, 3004
Offset: 1

Views

Author

Hugo Pfoertner, Apr 25 2024

Keywords

Comments

a(n)/2 are the differences at supporting points of the upper envelope of the scatter band of the deviation of the binary weight of 3^k from half the length of the corresponding binary number.

Crossrefs

A232237 Primes p such that p-2 and q are primes, where q is concatenation of binary representations of p and p-2: q = p * 2^L + p-2, where L is the length of binary representation of p-2: L=A070939(p-2).

Original entry on oeis.org

5, 7, 31, 271, 283, 433, 1291, 1321, 1429, 1489, 1951, 4723, 5503, 6091, 6133, 6553, 6871, 16651, 16981, 17029, 17191, 17209, 17749, 17791, 18541, 18919, 19471, 20149, 20479, 20551, 20809, 21319, 21649, 21739, 22111, 25309, 25801, 27061, 27409, 27541, 27691, 28549, 29131
Offset: 1

Views

Author

Alex Ratushnyak, Nov 20 2013

Keywords

Examples

			5 is 101 in binary, 3 is 11, and because 10111 = 23d is a prime, 5 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Partition[Prime[Range[3200]],2,1],#[[2]]-#[[1]]==2&&PrimeQ[ FromDigits[ Join[IntegerDigits[#[[2]],2],IntegerDigits[#[[1]],2]],2]]&][[All,2]] (* Harvey P. Dale, Feb 25 2018 *)

Formula

A232235(n) = a(n) * 2^A070939(a(n)-2) + a(n)-2.
Previous Showing 11-20 of 853 results. Next