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-6 of 6 results.

A296339 On an infinite 60-degree sector of hexagonal graph paper, fill in cells by antidiagonals so that each contains the least nonnegative integer such that no line of edge-adjacent cells contains a repeated term.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 10 2017

Keywords

Comments

To find the number to enter in a cell (assuming the sector is oriented as in the illustration in the link), look at all the numbers in the cells directly above the cell, in the cells to the "North-West", and in the cells to the "South-West", and take their "mex" (the smallest missing number).
The 0-cells in the array all lie on a perfectly straight line (in contrast to the situation in A274528). Also a(n) = 0 iff n = 2*m*(m+1) for some m.

Examples

			The initial rows are as follows (however, this does not show the adjancies between the cells correctly - for that, see the illustration in the link):
   0;
   1,  2;
   2,  0,  1;
   3,  1,  2,  4;
   4,  5,  0,  3,  6;
   5,  3,  4,  6,  7,  8;
   6,  4,  5,  0,  3,  9,  7;
   7,  8,  3,  1,  2,  4,  5,  9;
   8,  6,  7,  2,  0,  1,  9,  4,  3;
   9,  7,  8,  5,  1,  2,  6, 10, 11, 12;
  10, 11,  6,  9,  4,  0, ...
  ...
For example, referring to the illustration in the link and NOT to the triangle here, consider the first 5 in the array. The reason this is 5 is because in the column of cells above that cell we can see 2,0,1, to the NW we see 3, and to the SW we see 4, and the smallest missing number is 5.
		

Crossrefs

Two analogs of this for an infinite square chessboard are A269526 (which uses positive numbers) and A274528 (which uses nonnegative numbers).
For the right edge see A296340.
The second column is A004483. - Rémy Sigrist, Dec 11 2017
The third and fourth columns are A004482 and A298801.
See also A274820.

Programs

  • Mathematica
    ab = Table[0, {13}];
    nw = ab;
    A296339 = Reap[For[s = 1, s <= Length[ab], s++, sw = 0; For[c = 1, c <= s, c++, x = BitOr[ab[[c]], BitOr[nw[[s-c+1]], sw]]; v = IntegerExponent[x+1, 2]; Sow[v]; p = 2^v; sw += p; ab[[c]] += p; nw[[s-c+1]] += p]]][[2, 1]] (* Jean-François Alcover, Dec 18 2017, after Rémy Sigrist *) (* I changed the first line, which was ab = Table[0, 13];, to make this compatible with older versions of MMA - N. J. A. Sloane, Feb 03 2018 *)
  • PARI
    See Links section.

Extensions

More terms from Rémy Sigrist, Dec 11 2017

A330396 Permutation of the nonnegative integers partitioned into triples [3*k+2, 3*k+1, 3*k] for k >= 0.

Original entry on oeis.org

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

Views

Author

Guenther Schrack, Mar 03 2020

Keywords

Comments

Partition the nonnegative integer sequence into triples starting with (0,1,2); transpose the first and third elements of the triple, repeat for all triples.
A self-inverse sequence: a(a(n)) = n.
The sequence is an interleaving of A016789 with A016777 and with A008585, in that order.

Crossrefs

Fixed point sequence: A016777.
Relationships:
a(n) = a(n-1) - 1 + 6*A079978(n).
a(n) = 2*a(n-1) - a(n-2) + 6*A049347(n).
a(n) = A074066(n+2) - 2.
a(n) = A113655(n+1) - 1.

Programs

  • MATLAB
    a = zeros(1,10000);
    w = (-1+sqrt(-3))/2;
    fprintf('0 2\n');
    for n = 1:10000
       a(n) = int64((3*n + 2*w^(2*n)*(w + 2) + 2*w^n*(1 - w))/3);
       fprintf('%i %i\n',n,a(n));
    end

Formula

G.f.: (2 - x - x^2 + 3*x^3)/((x-1)^2*(1 + x + x^2)). [corrected by Georg Fischer, Apr 17 2020]
Linear recurrence: a(n) = a(n-1) + a(n-3) - a(n-4) for n > 4.
Simple recursion: a(n) = a(n-3) + 3 for n > 2 with a(0) = 2, a(1) = 1, a(2) = 0.
Negative domain: a(-n) = -(a(n-1) + 1).
Explicit formulas:
a(n) = n + 2 - 2*(n mod 3).
a(n) = 2 - n + 6*floor(n/3).
a(n) = n + 2*(w^(2*n)*(2 + w) + w^n*(1 - w))/3 where w = (-1 + sqrt(-3))/2.

A004491 Number of bent functions of 2n variables.

Original entry on oeis.org

2, 8, 896, 5425430528, 99270589265934370305785861242880
Offset: 0

Views

Author

N. J. A. Sloane, Sep 23 2008, based on emails from Philippe Langevin, Gregor Leander and Pante Stanica

Keywords

Comments

The old entry with this sequence number was a duplicate of A004483.

References

  • Carlet, C. & Mesnager, S., Four decades of research on bent functions, Designs, Codes and Cryptography, January 2016, Volume 78, Issue 1, pp. 5-50.
  • J. F. Dillon, Elementary Hadamard Difference Sets, Ph. D. Thesis, Univ. Maryland, 1974.
  • J. F. Dillon, Elementary Hadamard Difference Sets, in Proc. 6th South-Eastern Conf. Combin. Graph Theory Computing (Utilitas Math., Winnipeg, 1975), pp. 237-249.
  • F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier/North Holland, 1977. [Section 5 of Chap. 14 deals with bent functions. For a(2) see page 418.]
  • B. Preneel, Analysis and design of cryptographic hash functions, Ph. D. thesis, Katholieke Universiteit Leuven, Belgium, 1993. [Confirms a(3).]

Crossrefs

See A099090 for a normalized version.

Extensions

a(4) found in 2008 by Philippe Langevin and Gregor Leander.

A004498 Tersum n + 9.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Formula

Tersum m + n: write m and n in base 3 and add mod 3 with no carries; e.g., 5 + 8 = "21" + "22" = "10" = 1.

A298801 Fourth column of triangular array in A296339.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 02 2018

Keywords

Comments

This was the first column of A296339 for which no simple formula was known (cf. A004483, A004482). (Since these are Grundy values for a certain game, there is a complicated recurrence involving the whole triangle.) The formula below matches the data, and is fairly short (but ugly).

Crossrefs

Formula

It appears that for n >= 8, a(n) = tersum(n,1) + 6 if n == 2 (mod 3), otherwise tersum(n,1) - 3.
Conjectures from Colin Barker, Feb 03 2018: (Start)
G.f.: (4 - x + 3*x^2 - 10*x^3 + 2*x^4 - 2*x^5 + 9*x^6 + 3*x^7 + 2*x^8 - 8*x^9 - 3*x^10 + 4*x^11) / ((1 - x)^2*(1 + x + x^2)).
a(n) = a(n-1) + a(n-3) - a(n-4) for n>11.
(End)

A004499 Tersum n + 10.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Formula

Tersum m + n: write m and n in base 3 and add mod 3 with no carries; e.g., 5 + 8 = "21" + "22" = "10" = 1.
Showing 1-6 of 6 results.