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.

User: Ron R. King

Ron R. King's wiki page.

Ron R. King has authored 8 sequences.

A230445 Triangle read by rows: T(n,m) = 3^m*2^(n-m)-1, the number of neighbors in an n-dimensional cubic array.

Original entry on oeis.org

0, 1, 2, 3, 5, 8, 7, 11, 17, 26, 15, 23, 35, 53, 80, 31, 47, 71, 107, 161, 242, 63, 95, 143, 215, 323, 485, 728, 127, 191, 287, 431, 647, 971, 1457, 2186, 255, 383, 575, 863, 1295, 1943, 2915, 4373, 6560, 511, 767, 1151, 1727, 2591, 3887, 5831, 8747, 13121
Offset: 0

Author

Ron R. King, Oct 18 2013

Keywords

Comments

Let n be the dimension of the cubic array.
Let m be the "placement depth" of the cell within the array. m = (number of horizontal or vertical neighbors)-n. 0 <= m <= n.
Let T(n,m) represent the number of neighbors (horizontally, vertically, or diagonally) a cell has in an n-dimensional cube that has at least 3^n cells.
The sequence forms a triangle structure similar to Pascal’s triangle: T(0,0) in row one, T(1,0), T(1,1) in row two, etc.
The triangle in A094615 is a subtriangle. - Philippe Deléham, Oct 31 2013
In a finite n-dimensional hypercube lattice, the sequence gives the number of nodes situated at a Chebyshev distance of 1 for a node, situated on an m-cube bound, which is not on an (m-1)-cube bound. The number of m-cube bounds for n-cube is given by A013609. In cellular automata theory, the cell surrounding with Chebyshev distance 1 is called Moore's neighborhood. For von Neumann neighborhood (with Manhattan distance 1), an analogous sequence is represented by A051162. - Dmitry Zaitsev, Oct 22 2015

Examples

			Triangle starts:
n \ m  0    1    2    3    4    5     6     7     8     9    10 ...
0:     0
1:     1    2
2:     3    5    8
3:     7   11   17   26
4:    15   23   35   53   80
5:    31   47   71  107  161  242
6:    63   95  143  215  323  485   728
7:   127  191  287  431  647  971  1457  2186
8:   255  383  575  863 1295 1943  2915  4373  6560
9:   511  767 1151 1727 2591 3887  5831  8747 13121 19682
10: 1023 1535 2303 3455 5183 7775 11663 17495 26243 39365 59048
... (reformatted (and extended) by _Wolfdieter Lang_, May 04 2022)
For a 3-d cube, at a corner, the number of horizontal and vertical neighbors is 3, hence m = 3-3 = 0.
Along the edge, the number of horizontal and vertical neighbors is 4, hence m = 4-3 = 1.
In a face, the number of horizontal and vertical neighbors is 5, hence m = 5-3 = 2.
In the interior, the number of horizontal and vertical neighbors is 6, hence m = 6-3 = 3.
T(3,2) = 17 because a cell on the face of a 3-d cube has 17 neighbors.
		

Crossrefs

Sequence numbers are 1 less than A036561.

Programs

  • C
    void a10(){int p3[10], p2[10], n, m, a; p3[0]=1; p2[0]=1;
    for(n=1;n<10;n++){ p2[n]=p2[n-1]*2; p3[n]=p3[n-1]*3;
      for(m=0;m<=d;m++){ a=p3[m]*p2[n-m]-1; printf("%d ",a); }
      printf("\n"); } } /* Dmitry Zaitsev, Oct 23 2015 */
  • Mathematica
    Table[3^m 2^(n - m) - 1, {n, 0, 9}, {m, 0, n}] // Flatten (* Michael De Vlieger, Oct 23 2015 *)

Formula

T(n,m) = 3^m*2^(n-m)-1, 0 <= m <= n.
T(n,0) = 2^n-1. (A000225)
T(n,n) = 3^n-1. (A024023)
T(n,m) = (3*T(n,m-1)+1)/2, first part of the Collatz sequence for the number 2^n-1, for n >= 1.
T(n,m) = (T(n-1,m) + T(n,m+1))/2, 0 <= m <= n-1.
T(n,m) = 1 + T(n-1,m-1) + T(n,m-1), 1 <= m <= n.
m = T2(n,k)-n, where T2(n,k) is A051162.
From Wolfdieter Lang, May 04 2022: (Start)
G.f. for column m: G(m, x) = x^m*(3^m - 1 - (3^m - 2)*x)/((1 - 2*x)*(1 - x)).
G.f. for row polynomials R(n, x) = Sum_{m=1..n} T(n, m)*x^m, for n >= 0: G(z, x) = z*(1 + (2 - 5*z)*x)/((1 - 2*z)*(1 - z)*(1 - 3*x*z)*(1 - x*z)).
(End)

A157806 Absolute value of the difference between numerator and denominator of fractions arranged by Cantor's ordering (1/1, 2/1, 1/2, 1/3, 3/1, 4/1, 3/2, 2/3, 1/4, 1/5, 5/1, 6/1, ...) with equivalent fractions removed.

Original entry on oeis.org

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

Author

Ron R. King, Mar 07 2009

Keywords

Crossrefs

Sum of numerator and denominator is given by A038567.

Programs

  • PARI
    seq(n)={my(L=List(), r=1, k=1); while(#L<=n, if(k==r, r++; k=0); k++; if(gcd(k,r-k)==1, listput(L, abs(r-2*k)))); Vec(L)} \\ Andrew Howroyd, Feb 03 2021

Extensions

Terms a(56) and beyond from Andrew Howroyd, Feb 03 2021

A157807 Numerators of fractions arranged in "antidiagonal boustrophedon" ordering with equivalent fractions removed: (1/1, 2/1, 1/2, 1/3, 3/1, 4/1, 3/2, 2/3, 1/4, 1/5, 5/1, 6/1, 5/2, ...).

Original entry on oeis.org

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

Author

Ron R. King, Mar 07 2009

Keywords

Crossrefs

Cf. A157813 (denominators), A038566.
With Cantor's ordering: A020652, A020653, A352911.

Programs

  • Maple
    R:= NULL: count:= 0:
    for m from 2 while count < 100 do
      S:= select(t -> igcd(t,m-t)=1, [$1..m-1]);
      count:= count+nops(S);
      if m::even then R:= R, op(S) else R:= R, seq(m-t,t=S) fi;
    od:
    R; # Robert Israel, Oct 09 2023
  • Python
    from math import gcd
    for s in range(2, 100, 2):
      for i in range(1, s):
        if gcd(i, s - i) != 1: continue
        print(i)
      for i in range(s, 0, -1):
        if gcd(i, s + 1 - i) != 1: continue
        print(i)
    # Hiroaki Yamanouchi, Oct 06 2014

Extensions

A-number in cross-reference corrected by R. J. Mathar, Sep 23 2009
a(19)-a(20) corrected and a(58)-a(82) added by Hiroaki Yamanouchi, Oct 06 2014
Name corrected by Andrey Zabolotskiy, Oct 10 2023

A157813 Denominators of fractions arranged in "antidiagonal boustrophedon" ordering with equivalent fractions removed: (1/1, 2/1, 1/2, 1/3, 3/1, 4/1, 3/2, 2/3, 1/4, 1/5, 5/1, 6/1, 5/2, ...).

Original entry on oeis.org

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

Author

Ron R. King, Mar 07 2009

Keywords

Crossrefs

Cf. A157807 (numerators), A038567.
With Cantor's ordering: A020652, A020653, A352911.

Programs

  • Maple
    R:= NULL: count:= 0:
    for m from 2 while count < 100 do
      S:= select(t -> igcd(t,m-t)=1, [$1..m-1]);
      count:= count+nops(S);
      if m::odd then R:= R, op(S) else R:= R, seq(m-t,t=S) fi;
    od:
    R; # Robert Israel, Oct 09 2023
  • Python
    from math import gcd
    for s in range(2, 100, 2):
      for i in range(1, s):
        if gcd(i, s - i) != 1: continue
        print(s - i)
      for i in range(s, 0, -1):
        if gcd(i, s + 1 - i) != 1: continue
        print(s + 1 - i)
    # Hiroaki Yamanouchi, Oct 06 2014

Extensions

a(58)-a(83) from Hiroaki Yamanouchi, Oct 06 2014
Name corrected by Andrey Zabolotskiy, Oct 10 2023

A123522 Not of the form n + [log_10 n].

Original entry on oeis.org

0, 10, 101, 1002, 10003, 100004, 1000005, 10000006, 100000007, 1000000008, 10000000009, 100000000010, 1000000000011, 10000000000012, 100000000000013, 1000000000000014, 10000000000000015, 100000000000000016
Offset: 0

Author

Ron R. King, Nov 10 2006

Keywords

Comments

Smallest number such that (sum of digits) mod (number of digits) = n in decimal representation. - Reinhard Zumkeller, Aug 15 2010
Consider a word on the alphabet {0,1,2,...,9} that has length of 10^a(n). The expected number of occurrences of a pattern (contiguous subsequence) p_1,p_2,...p_n for all such words is 1. - Geoffrey Critzer, Feb 03 2012

Programs

  • Magma
    [10^n + n -1: n in [0..30]]; // G. C. Greubel, Nov 30 2017
  • Mathematica
    Table[10^n + n - 1, {n, 0, 20}]  (* Geoffrey Critzer, Feb 03 2012 *)
    LinearRecurrence[{12,-21,10},{0,10,101},20] (* Harvey P. Dale, Jul 20 2021 *)
  • PARI
    for(n=0,30, print1(10^n + n -1, ", ")) \\ G. C. Greubel, Nov 30 2017
    

Formula

a(n) = 10^n + n - 1.
From Reinhard Zumkeller, Aug 15 2010: (Start)
A180160(a(n)) = n and A180160(m) <> n for m < a(n).
A007953(a(n)) = n; A055642(a(n)) = n + 1. (End)
From R. J. Mathar, Aug 15 2010: (Start)
G.f.: x*(-10+19*x) / ( (10*x-1)*(x-1)^2 ).
a(n) = 12*a(n-1) -21*a(n-2) +10*a(n-3). (End)

Extensions

a(0) and terms beyond a(9) from Reinhard Zumkeller, Aug 15 2010

A118656 If C represents the minimum number of segments required to construct n unit cubes, then this sequence represents the number of additional segments required to construct n+1 unit cubes. First differences of sequence A117227.

Original entry on oeis.org

12, 8, 8, 5, 8, 5, 5, 3, 8, 5, 5, 3, 8, 5, 5, 3, 5, 3, 8, 5, 5, 3, 5, 3, 5, 3, 3
Offset: 1

Author

Ron R. King, May 18 2006

Keywords

Examples

			a(1)=12 because 12 segments are required to construct the first unit cube. a(2)=8 because 8 additional unit segments are required to construct two unit cubes.
		

Crossrefs

Cf. A117227.

A118659 Minimum number of unit faces required to construct n unit cubes.

Original entry on oeis.org

6, 11, 16, 20, 25, 29, 33, 36, 41, 45, 49, 52, 57, 61, 65, 68, 72, 75, 80, 84, 88, 91, 95, 98, 102, 105, 108, 113, 117, 121, 124, 128, 131, 135, 138, 141, 146, 150, 154, 157, 161, 164, 168, 171, 174, 178, 181, 184, 189, 193, 197, 200, 204, 207, 211, 214, 217, 221, 224
Offset: 1

Author

Ron R. King, May 18 2006

Keywords

Examples

			a(2)=11 because 6 unit faces are required to construct each cube but 1 face is shared. I.e., a(2)=6+5=11.
		

Crossrefs

Formula

a(n^3) = 3*(n^2)*(n+1) = A270205(n+1). - Mohammed Yaseen, Aug 22 2021

Extensions

Missing term a(56)=214 inserted by Mohammed Yaseen, Aug 22 2021

A117227 Minimum number of unit segments required to construct n unit cubes.

Original entry on oeis.org

12, 20, 28, 33, 41, 46, 51, 54, 62, 67, 72, 75, 83, 88, 93, 96, 101, 104, 112, 117, 122, 125, 130, 133, 138, 141, 144
Offset: 1

Author

Ron R. King, Apr 22 2006

Keywords

Comments

This generalizes the 2-dimensional version which is A078633.

Examples

			a(2)=20 because 12 unit segments are required to construct each cube but 4 units are shared. I.e., a(2)=12+8=20.
		

Crossrefs

Cf. A078633.