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.

Showing 1-8 of 8 results.

A236341 a(n) = the position of n in A160855 or 0 if n is not in A160855.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 13 2014

Keywords

Comments

If A160855 is a permutation of the positive integers then a(n) > 0 and A160855(a(n)) = n and a(A160855(n)) = n.

Crossrefs

Cf. A160855.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a236341 = (+ 1) . fromJust . (`elemIndex` a160855_list)
  • Mathematica
    Block[{nn = 66, a = {}}, Do[k = 1; While[Or[MemberQ[a, k], SequencePosition[IntegerDigits[Total@ a + k, 2], #] == {}], k++] &@ IntegerDigits[n, 2]; AppendTo[a, k], {n, 3 nn}]; Take[#, nn] &@ SortBy[MapIndexed[{First@ #2, #1} &, a], Last][[All, 1]]] (* Michael De Vlieger, Aug 09 2017 *)

Extensions

Better definition from Michael De Vlieger, Aug 09 2017

A286681 a(n) = the smallest positive integer not occurring earlier in the sequence such that SumXOR_{k=1..n} a(k) written in binary contains binary n as a substring, where SumXOR is the analog of summation under the binary XOR operation.

Original entry on oeis.org

1, 3, 4, 2, 9, 11, 8, 6, 17, 12, 14, 7, 33, 5, 23, 15, 49, 35, 20, 18, 30, 28, 24, 22, 10, 40, 44, 42, 38, 36, 32, 94, 34, 96, 65, 43, 45, 41, 107, 79, 58, 56, 60, 122, 118, 52, 48, 46, 19, 81, 84, 82, 95, 29, 25, 31, 73, 67, 13, 75, 70, 68, 64, 62, 129, 69
Offset: 1

Views

Author

Rémy Sigrist, May 13 2017

Keywords

Comments

This sequence is a variant of A160855: here we consider SumXOR, there Sum.
The partial XOR sums are given by A286712.

Crossrefs

A162555 a(n) = the smallest positive integer not occurring earlier in the sequence such that Sum_{k=1..n} a(k) written in decimal contains decimal n as a substring.

Original entry on oeis.org

1, 11, 18, 4, 16, 6, 14, 8, 12, 10, 13, 7, 15, 5, 17, 3, 19, 2, 9, 30, 101, 201, 301, 401, 26, 76, 501, 453, 49, 601, 170, 32, 168, 34, 20, 82, 264, 38, 162, 40, 160, 42, 158, 44, 106, 96, 154, 48, 152, 50, 150, 52, 148, 54, 146, 56, 21, 81, 242, 60, 140, 62, 138, 64, 136
Offset: 1

Views

Author

Kerry Mitchell, Jul 06 2009

Keywords

Comments

A permutation of the positive integers. - M. F. Hasler, Mar 05 2018

Examples

			a(3) = 18 because that makes the sum of the first 3 terms 30, containing a substring of "3." 11 would make a sum of 23, but 11 was already used in a(2).
		

Crossrefs

Cf. A160855 for the same concept using strings of binary for the sum and substring.
See A300062 for a strictly increasing variant.

Programs

A286417 Lexicographically earliest sequence of distinct positive terms such that the binary representation of the n-th prime contains the binary representation of a(n).

Original entry on oeis.org

1, 3, 2, 7, 5, 6, 4, 9, 11, 13, 15, 18, 10, 21, 23, 26, 14, 29, 8, 17, 36, 19, 20, 12, 16, 25, 39, 43, 22, 24, 31, 32, 34, 69, 37, 75, 78, 35, 41, 45, 44, 53, 47, 48, 49, 71, 52, 27, 28, 50, 58, 55, 30, 59, 64, 65, 33, 67, 138, 70, 141, 73, 38, 77, 57, 61, 82
Offset: 1

Views

Author

Rémy Sigrist, May 08 2017

Keywords

Comments

This sequence is a permutation of the natural numbers.
As for A160855, the scatterplot of this sequence shows (almost) straight lines:
- here those lines are related to the position of a(n) in the n-th prime (in binary representation),
- the scatterplot of the possible values of a(n) as a function of the n-th prime constitutes a network of lines in which the scatterplot of a(n) lies,
- see also the scatterplots in the Links section.
For any n>0, a(n) <= A000040(n); the first known values where equality occurs are a(2) = 3 and a(4) = 7.
The fixed points of the sequence belong to A091020.
The first fixed points are: 1, 5, 6, 31, 32, 50, 81, 1052, 3378.

Examples

			See illustration of the first terms in the Links section.
		

Crossrefs

A286709 For k>0, let bin(k) = the string corresponding to the binary representation of k, and neg(k) = bin(k) under the character substitution '0' <-> '1'; a(n) = the smallest positive integer not occurring earlier in the sequence such that bin(Sum_{k=1..n} a(k)) contains neg(n) as a substring.

Original entry on oeis.org

2, 3, 4, 10, 1, 5, 7, 14, 8, 15, 11, 19, 31, 6, 24, 28, 18, 12, 50, 32, 30, 9, 21, 38, 13, 42, 63, 20, 16, 25, 64, 61, 51, 44, 27, 35, 89, 37, 87, 39, 85, 41, 83, 17, 107, 45, 79, 29, 52, 92, 75, 22, 102, 53, 71, 40, 43, 34, 23, 103, 127, 128, 62, 188, 66, 60
Offset: 1

Views

Author

Rémy Sigrist, May 13 2017

Keywords

Comments

When considering bin(k), all leading zeros are removed: bin(2) = "10".
When considering neg(k), all leading zeros are preserved: neg(2) = "01".
The scatterplots of this sequence and of A160855 show similar entanglements of lines.
Partial sums are given by A286713.

Crossrefs

A317788 Lexicographically earliest infinite sequence of distinct positive terms such that for any n > 1, the binary representation of a(n) appears as a substring in the binary representation of Sum_{k=1..n-1} a(k).

Original entry on oeis.org

2, 1, 3, 6, 4, 8, 12, 9, 5, 18, 17, 10, 7, 19, 14, 16, 11, 20, 13, 24, 22, 15, 32, 36, 34, 25, 23, 37, 27, 21, 26, 64, 69, 40, 43, 29, 30, 35, 39, 44, 28, 42, 53, 129, 72, 38, 31, 81, 45, 50, 46, 47, 49, 74, 41, 54, 55, 51, 52, 57, 58, 128, 68, 70, 140, 77, 60
Offset: 1

Views

Author

Rémy Sigrist, Aug 07 2018

Keywords

Comments

The sequence must start with a(1) = 2 in order to be infinite, and for any n > 1, a(n) <= Sum_{k=1..n-1} a(k).
This sequence has similarities with A160855.

Examples

			The first terms, alongside the binary representations of a(n) and of Sum_{k=1..n-1} a(k), are:
  n  a(n)  bin(a(n))  bin(Sum_{k=1..n-1} a(k))
  -- ----  ---------  ------------------------
   1    2         10         0
   2    1          1        10
   3    3         11        11
   4    6        110       110
   5    4        100      1100
   6    8       1000     10000
   7   12       1100     11000
   8    9       1001    100100
   9    5        101    101101
  10   18      10010    110010
		

Crossrefs

Cf. A160855.

A160856 a(1)=1. a(n) = the smallest integer > a(n-1) such that a(n) written in binary contains binary n as a substring, and such that (for n>=2) each value a(k)-a(k-1), for 2<=k<=n, is unique.

Original entry on oeis.org

1, 4, 6, 12, 20, 24, 29, 40, 50, 74, 86, 99, 106, 115, 143, 160, 196, 210, 230, 276, 298, 342, 367, 385, 400, 416, 435, 456, 479, 505, 543, 576, 644, 674, 711, 740, 805, 844, 871, 928, 978, 1066, 1111, 1196, 1243, 1326, 1374, 1408, 1457, 1508, 1587, 1640
Offset: 1

Views

Author

Leroy Quet, May 28 2009

Keywords

Comments

For n >= 2, a(n)-a(n-1) = A160855(n).

Crossrefs

Cf. A160855.

Extensions

Extended by Ray Chandler, Jun 15 2009

A300082 a(1) = 1, a(n) = the smallest integer > a(n-1) such that Sum_{k=1..n} a(k) written in binary contains binary n as a substring.

Original entry on oeis.org

1, 3, 7, 8, 10, 15, 16, 20, 21, 37, 38, 40, 53, 65, 80, 82, 84, 96, 111, 129, 150, 172, 193, 201, 202, 203, 227, 228, 254, 258, 259, 289, 296, 316, 317, 327, 349, 371, 399, 425, 426, 432, 449, 453, 509, 513, 526, 548, 593, 594, 611, 642, 643, 644, 648, 649
Offset: 1

Views

Author

Rémy Sigrist and Chai Wah Wu, Feb 24 2018

Keywords

Comments

This sequence is a binary variant of A300062.
The scatterplot of the first difference has interesting features (see Links section).

Examples

			The first terms, alongside the binary representation of Sum_{k=1..n} a(k) with the binary representation of n in brackets, are:
  n     a(n)      bin(Sum_{k=1..n} a(k))
  --    ----      ----------------------
   1       1              (1)
   2       3            (10)0
   3       7           10(11)
   4       8          (100)11
   5      10          11(101)
   6      15         10(110)0
   7      16         (111)100
   8      20        10(1000)0
   9      21        1(1001)01
  10      37       1000(1010)
  11      38       (1011)0000
  12      40       110(1100)0
  13      53      10000(1101)
  14      65      10100(1110)
  15      80      1100(1111)0
  16      82      1111(10000)
		

Crossrefs

Programs

  • Perl
    See Links section.
Showing 1-8 of 8 results.