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.

A257053 Primes in enhanced squares representation, cf. A256913.

Original entry on oeis.org

2, 3, 4, 1, 4, 3, 9, 2, 9, 4, 16, 1, 16, 3, 16, 4, 3, 25, 4, 25, 4, 2, 36, 1, 36, 4, 1, 36, 4, 3, 36, 9, 2, 49, 4, 49, 9, 1, 49, 9, 3, 64, 3, 64, 4, 3, 64, 9, 64, 9, 4, 2, 81, 2, 81, 4, 3, 1, 81, 16, 100, 1, 100, 3, 100, 4, 3, 100, 9, 100, 9, 4, 121, 4, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 15 2015

Keywords

Comments

A257070(n) = length of n-th row;
T(n,k) = A256913(A000040(n),k), k = 0..A257070(n)-1;
T(n,0) = A065730(n) for n > 2;
T(n,A257071(n)-1) = A257070(n).

Examples

			.   n | prime(n) |  ESR, row sum = prime(n)
.  ---+----------+-------------------------
.   1 |        2 |  [2]
.   2 |        3 |  [3]
.   3 |        5 |  [4, 1]
.   4 |        7 |  [4, 3]
.   5 |       11 |  [9, 2]
.   6 |       13 |  [9, 4]
.   7 |       17 |  [16, 1]
.   8 |       19 |  [16, 3]
.   9 |       23 |  [16, 4, 3]
.  10 |       29 |  [25, 4]
.  11 |       31 |  [25, 4, 2]
.  12 |       37 |  [36, 1]
.  13 |       41 |  [36, 4, 1]
.  14 |       43 |  [36, 4, 3]
.  15 |       47 |  [36, 9, 2]
.  16 |       53 |  [49, 4]
.  17 |       59 |  [49, 9, 1]
.  18 |       61 |  [49, 9, 3]
.  19 |       67 |  [64, 3]
.  20 |       71 |  [64, 4, 3]
.  21 |       73 |  [64, 9]
.  22 |       79 |  [64, 9, 4, 2]
.  23 |       83 |  [81, 2]
.  24 |       89 |  [81, 4, 3, 1]
.  25 |       97 |  [81, 16]
		

Crossrefs

%Cf. A256913, A000040, A065730, A257070 (traces), A257071 (row lengths).

Programs

  • Haskell
    a257053 n k = a257053_tabf !! (n-1) !! k
    a257053_row n = a257053_tabf !! (n-1)
    a257053_tabf = map (a256913_row . fromIntegral) a000040_list

A257047 Numbers not having trace 1 in their enhanced squares representation, see A256913.

Original entry on oeis.org

0, 2, 3, 4, 6, 7, 9, 11, 12, 13, 15, 16, 18, 19, 20, 22, 23, 25, 27, 28, 29, 31, 32, 34, 36, 38, 39, 40, 42, 43, 45, 47, 48, 49, 51, 52, 53, 55, 56, 58, 60, 61, 62, 64, 66, 67, 68, 70, 71, 73, 75, 76, 77, 79, 80, 81, 83, 84, 85, 87, 88, 90, 92, 93, 94, 96
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 15 2015

Keywords

Comments

A256914(a(n)) != 1.

Crossrefs

Cf. A256913, A256914, A257046 (complement).

Programs

  • Haskell
    a257047 n = a257047_list !! (n-1)
    a257047_list = filter ((/= 1) . a256914) [0..]

A257046 Numbers having trace 1 in their enhanced squares representation, see A256913.

Original entry on oeis.org

1, 5, 8, 10, 14, 17, 21, 24, 26, 30, 33, 35, 37, 41, 44, 46, 50, 54, 57, 59, 63, 65, 69, 72, 74, 78, 82, 86, 89, 91, 95, 98, 101, 105, 108, 110, 114, 117, 122, 126, 129, 131, 135, 138, 142, 145, 149, 152, 154, 158, 161, 165, 168, 170, 174, 177, 179, 183, 186
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 15 2015

Keywords

Comments

A256914(a(n)) = 1.

Crossrefs

Cf. A256913, A256914, A257047 (complement).

Programs

  • Haskell
    a257046 n = a257046_list !! (n-1)
    a257046_list = filter ((== 1) . a256914) [0..]

A257070 Traces of primes in enhanced squares representation, cf. A256913.

Original entry on oeis.org

2, 3, 1, 3, 2, 4, 1, 3, 3, 4, 2, 1, 1, 3, 2, 4, 1, 3, 3, 3, 9, 2, 2, 1, 16, 1, 3, 3, 9, 4, 2, 1, 16, 2, 1, 3, 4, 3, 3, 4, 1, 3, 2, 1, 1, 3, 2, 2, 2, 4, 1, 1, 16, 1, 1, 3, 4, 2, 1, 25, 2, 4, 2, 2, 1, 3, 3, 4, 3, 25, 4, 1, 2, 3, 2, 2, 3, 36, 1, 9, 3, 1, 2, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 15 2015

Keywords

Comments

a(n) = A256914(A000040(n)).

Crossrefs

Programs

  • Haskell
    a257070 = last . a257053_row

A257071 Length of enhanced squares representation of n-th prime, cf. A256913.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 15 2015

Keywords

Comments

a(n) = A256915(A000040(n)).

Crossrefs

Programs

  • Haskell
    a257071 = length . a257053_row

A256914 Trace of the enhanced squares representation of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 2, 3, 1, 9, 1, 2, 3, 4, 1, 2, 16, 1, 2, 3, 4, 1, 2, 3, 1, 25, 1, 2, 3, 4, 1, 2, 3, 1, 9, 1, 36, 1, 2, 3, 4, 1, 2, 3, 1, 9, 1, 2, 3, 49, 1, 2, 3, 4, 1, 2, 3, 1, 9, 1, 2, 3, 4, 1, 64, 1, 2, 3, 4, 1, 2, 3, 1, 9, 1, 2, 3, 4, 1, 2, 16, 81, 1, 2
Offset: 0

Views

Author

Clark Kimberling, Apr 14 2015

Keywords

Comments

See A256913 for definitions.
a(A257046(n)) = 1; a(A257047(n)) != 1. - Reinhard Zumkeller, Apr 15 2015

Examples

			R(0) = 0, so trace = 0.
R(1) = 1, so trace = 1.
R(8) = 4 + 3 + 1, so trace = 1.
R(43) = 36 + 4 + 3, so trace = 3.
		

Crossrefs

Cf. A000290, A256913, A256915 (number of terms).

Programs

  • Haskell
    a256914 = last . a256913_row  -- Reinhard Zumkeller, Apr 15 2015
  • Mathematica
    b[n_] := n^2; bb = Insert[Table[b[n], {n, 0, 100}]  , 2, 3];
    s[n_] := Table[b[n], {k, 1, 2 n + 1}];
    h[1] = {0, 1, 2, 3}; h[n_] := Join[h[n - 1], s[n]];
    g = h[100]; Take[g, 100]
    r[0] = {0}; r[1] = {1}; r[2] = {2}; r[3] = {3}; r[8] = {4, 3, 1};
    r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]];
    t = Table[r[n], {n, 0, 120}] (* A256913, before concatenation *)
    Flatten[t]  (* A256913 *)
    Table[Last[r[n]], {n, 0, 120}]    (* A256914 *)
    Table[Length[r[n]], {n, 0, 200}]  (* A256915 *)

A256915 Length of the enhanced squares representation of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 2, 3, 1, 2, 2, 2, 2, 3, 3, 1, 2, 2, 2, 2, 3, 3, 3, 4, 1, 2, 2, 2, 2, 3, 3, 3, 4, 2, 3, 1, 2, 2, 2, 2, 3, 3, 3, 4, 2, 3, 3, 3, 1, 2, 2, 2, 2, 3, 3, 3, 4, 2, 3, 3, 3, 3, 4, 1, 2, 2, 2, 2, 3, 3, 3, 4, 2, 3, 3, 3, 3, 4, 4, 2, 1, 2, 2, 2, 2
Offset: 0

Views

Author

Clark Kimberling, Apr 14 2015

Keywords

Comments

See A256913 for definitions.

Examples

			R(0) = 0, so length = 1.
R(1) = 1, so length = 1.
R(8) = 4 + 3 + 1, so length = 3.
R(7224) = 7056 + 144 + 16 + 4 + 3 + 1, so length = 6.
		

Crossrefs

Cf. A000290, A256913, A256914 (trace).
Cf. A257071.

Programs

  • Haskell
    a256915 = length . a256913_row  -- Reinhard Zumkeller, Apr 15 2015
  • Mathematica
    b[n_] := n^2; bb = Insert[Table[b[n], {n, 0, 100}]  , 2, 3];
    s[n_] := Table[b[n], {k, 1, 2 n + 1}];
    h[1] = {0, 1, 2, 3}; h[n_] := Join[h[n - 1], s[n]];
    g = h[100]; Take[g, 100]
    r[0] = {0}; r[1] = {1}; r[2] = {2}; r[3] = {3}; r[8] = {4, 3, 1};
    r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]];
    t = Table[r[n], {n, 0, 120}] (* A256913, before concatenation *)
    Flatten[t]  (* A256913 *)
    Table[Last[r[n]], {n, 0, 120}]    (* A256914 *)
    Table[Length[r[n]], {n, 0, 200}]  (* A256915 *)

A256909 Enhanced triangular-number representations, concatenated.

Original entry on oeis.org

0, 1, 2, 3, 3, 1, 3, 2, 6, 6, 1, 6, 2, 6, 3, 10, 10, 1, 10, 2, 10, 3, 10, 3, 1, 15, 15, 1, 15, 2, 15, 3, 15, 3, 1, 15, 3, 2, 21, 21, 1, 21, 2, 21, 3, 21, 3, 1, 21, 3, 2, 21, 6, 28, 28, 1, 28, 2, 28, 3, 28, 3, 1, 28, 3, 2, 28, 6, 28, 6, 1, 36, 36, 1, 36, 2
Offset: 0

Views

Author

Clark Kimberling, Apr 13 2015

Keywords

Comments

Let B = {0,1,2,3,6,10,15,21,...}, so that B consists of the triangular numbers together with 0 and 2. We call B the enhanced basis of triangular numbers. Define R(0) = 0 and R(n) = g(n) + R(n - g(n)) for n > 0, where g(n) is the greatest number in B that is <= n. Thus, each n has an enhanced triangular-number representation of the form R(n) = b(m(n)) + b(m(n-1)) + ... + b(m(k)), where b(n) > m(n-1) > ... > m(k) > 0, in which the last term, b(m(k)) is the trace.
The least n for which R(n) has more than 4 terms is given by R(7259) = 7140 + 105 + 10 + 3 + 1.

Examples

			R(0) = 0;
R(1) = 1;
R(2) = 2;
R(3) = 3;
R(4) = 3 + 1;
R(5) = 3 + 2;
R(6) = 6;
R(119) = 105 + 10 + 3 + 1.
		

Crossrefs

Cf. A000217, A256910 (trace), A256911 (number of terms), A255974 (minimal alternating triangular-number representations), A256913 (enhanced squares representations).

Programs

  • Mathematica
    b[n_] := n (n + 1)/2; bb = Insert[Table[b[n], {n, 0, 200}], 2, 3]
    s[n_] := Table[b[n], {k, 1, n + 1}];
    h[1] = {0, 1, 2}; h[n_] := Join[h[n - 1], s[n]];
    g = h[200]; r[0] = {0};
    r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]];
    t = Table[r[n], {n, 0, 120}] (*A256909 before concatenation*)
    Table[Last[r[n]], {n, 0, 120}]    (*A256910*)
    Table[Length[r[n]], {n, 0, 120}]  (*A256911*)
Showing 1-8 of 8 results.