[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
Search: a256914 -id:a256914
Displaying 1-5 of 5 results found. page 1
     Sort: relevance | references | number | modified | created      Format: long | short | data
A256913 Enhanced squares representations for k = 0, 1, 2, ..., concatenated. +10
9
0, 1, 2, 3, 4, 4, 1, 4, 2, 4, 3, 4, 3, 1, 9, 9, 1, 9, 2, 9, 3, 9, 4, 9, 4, 1, 9, 4, 2, 16, 16, 1, 16, 2, 16, 3, 16, 4, 16, 4, 1, 16, 4, 2, 16, 4, 3, 16, 4, 3, 1, 25, 25, 1, 25, 2, 25, 3, 25, 4, 25, 4, 1, 25, 4, 2, 25, 4, 3, 25, 4, 3, 1, 25, 9, 25, 9, 1, 36 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Let B = {0,1,2,3,4,9,16,25,...}, so that B consists of the squares together with 2 and 3. We call B the enhanced basis of squares. 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 squares 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 5 terms is given by R(168) = 144 + 16 + 4 + 3 + 1.
The least n for which R(n) has 6 terms is given by R(7224) = 7056 + 144 + 16 + 4 + 3 + 1.
LINKS
EXAMPLE
R(0) = 0
R(1) = 1
R(2) = 2
R(3) = 3
R(4) = 4
R(8) = 4 + 3 + 1
R(24) = 16 + 4 + 3 + 1
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 *)
PROG
(Haskell)
a256913 n k = a256913_tabf !! n !! k
a256913_row n = a256913_tabf !! n
a256913_tabf = [0] : tail esr where
esr = (map r [0..8]) ++
f 9 (map fromInteger $ drop 3 a000290_list) where
f x gs@(g:hs@(h:_))
| x < h = (g : genericIndex esr (x - g)) : f (x + 1) gs
| otherwise = f x hs
r 0 = []; r 8 = [4, 3, 1]
r x = q : r (x - q) where q = [0, 1, 2, 3, 4, 4, 4, 4, 4] !! x
-- Reinhard Zumkeller, Apr 15 2015
CROSSREFS
Cf. A000290, A256914 (trace), A256915 (number of terms), A256789 (minimal alternating squares representations).
Cf. A257053 (primes).
KEYWORD
nonn,easy,tabf,nice
AUTHOR
Clark Kimberling, Apr 14 2015
STATUS
approved
A256915 Length of the enhanced squares representation of n. +10
4
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
See A256913 for definitions.
LINKS
EXAMPLE
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.
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 *)
PROG
(Haskell)
a256915 = length . a256913_row -- Reinhard Zumkeller, Apr 15 2015
CROSSREFS
Cf. A000290, A256913, A256914 (trace).
Cf. A257071.
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 14 2015
STATUS
approved
A257047 Numbers not having trace 1 in their enhanced squares representation, see A256913. +10
4
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A256914(a(n)) != 1.
LINKS
PROG
(Haskell)
a257047 n = a257047_list !! (n-1)
a257047_list = filter ((/= 1) . a256914) [0..]
CROSSREFS
Cf. A256913, A256914, A257046 (complement).
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 15 2015
STATUS
approved
A257046 Numbers having trace 1 in their enhanced squares representation, see A256913. +10
3
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A256914(a(n)) = 1.
LINKS
PROG
(Haskell)
a257046 n = a257046_list !! (n-1)
a257046_list = filter ((== 1) . a256914) [0..]
CROSSREFS
Cf. A256913, A256914, A257047 (complement).
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 15 2015
STATUS
approved
A257070 Traces of primes in enhanced squares representation, cf. A256913. +10
3
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) = A256914(A000040(n)).
LINKS
PROG
(Haskell)
a257070 = last . a257053_row
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 15 2015
STATUS
approved
page 1

Search completed in 0.007 seconds

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 19:33 EDT 2024. Contains 375545 sequences. (Running on oeis4.)