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-2 of 2 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

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 *)
Showing 1-2 of 2 results.